Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Hostname string Port uint16 WorkingDirectory string Threads uint16 ConnectionID uuid.UUID ReadBufferSize uint32 Quiet bool }
Config holds configuration for both sender and receiver
type ConnectionClose ¶
ConnectionClose closes the connection when sent from client to server
type File ¶
type File struct { ID uuid.UUID ConnectionID uuid.UUID FileSize int64 Name string RelativePath []string FileDescriptor io.WriteCloser ChunkQueue chan FileChunk }
File describes a file to be sent/received
func (*File) FullFilePath ¶
FullFilePath returns the absolute path of where a file should be located on disk according to a given config
func (*File) GetProgress ¶
GetProgress returns the progress of a file transfer as an ascii bar and a number from 0-100
func (*File) PrettySize ¶
PrettySize returns a human readable file size
func (*File) RelativeFilePath ¶
RelativeFilePath gives the path relative to the WorkingDirectory
type FileComplete ¶
FileComplete is sent when all chunks have been transfered
type INetCopyMessage ¶
type INetCopyMessage interface{}
INetCopyMessage is the interface type that is sent using gob encoding from client to server