core

package
v2.0.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 13, 2019 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AboutMessage = `` /* 2065-byte string literal not displayed */
View Source
const CHUNKSIZE = 1000000

CHUNKSIZE is 1MB

View Source
const HostOS = runtime.GOOS
View Source
const NUMRETRIES = 3

NUMRETRIES is 3

View Source
const TCPTIMEOUT = 10

TCPTIMEOUT is 10 seconds

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword() string

GeneratePassword returns a 4 char password to display on the receiving end and enter into the sending end

func IsRunAsAdmin

func IsRunAsAdmin() int

IsRunAsAdmin is a stub for a function only used on Windows.

func IsUserInAdminGroup

func IsUserInAdminGroup() int

IsUserInAdminGroup is a stub for a function only used on Windows.

func RelaunchAsAdmin

func RelaunchAsAdmin() int

RelaunchAsAdmin is a stub for a function only used on Windows.

func StartTransfer

func StartTransfer(t *Transfer, ui UI)

StartTransfer is the main routine, invoked by cli and gui.

Types

type Transfer

type Transfer struct {
	FileList     []string
	ReceiveDir   string
	Password     string
	SSID         string
	RecipientIP  string
	Peer         string // "mac", "windows", or "linux"
	Mode         string // "sending" or "receiving"
	PreviousSSID string
	DllLocation  string
	Port         int
	AdHocCapable bool
	Ctx          context.Context
	CancelCtx    context.CancelFunc
	WfdSendChan  chan string
	WfdRecvChan  chan string
}

Transfer holds all information necessary to send or receive files

type UI

type UI interface {
	Output(string)
	ShowProgressBar()
	UpdateProgressBar(int)
	ToggleStartButton()
	ShowPwPrompt() bool
}

UI interface provides methods to accept information from and update the user

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL