heiver

package
v0.0.0-...-f9e80be Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileDetails

type FileDetails struct {
	Name       string
	ActualName string
	Extension  string
	PathToFile string
	Size       int64
}

FileDetails contains information of a file

type Option

type Option struct {
	Port  int
	Debug bool
}

Option heiver options

type Receiver

type Receiver struct {
	Option        Option
	Server        *tcp.Server
	FileToReceive FileDetails
}

Receiver is the heiver receiver

func NewReceiver

func NewReceiver(ops Option) *Receiver

NewReceiver creates a new receiver with the given options

func (*Receiver) Listen

func (r *Receiver) Listen()

Listen starts the tcp server

type Sender

type Sender struct {
	Option     Option
	FileToSend FileDetails
	// contains filtered or unexported fields
}

Sender is the heiver sender

func NewSender

func NewSender(ops Option) *Sender

NewSender creates a new sender with the given options

func (*Sender) Send

func (s *Sender) Send(path string)

Send sends the file to the receiver

Jump to

Keyboard shortcuts

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