client

package
v0.0.0-...-895d03b Latest Latest
Warning

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

Go to latest
Published: May 6, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//AckFileCheck is channel on receiving ack on file request
	AckFileCheck = make(chan uint32)
)

Functions

func CheckOnPck

func CheckOnPck(packet *socket.Packet, algo string, buffer map[int][]byte, filename string) int

CheckOnPck is checking if the packet is the last packet or not

func CreateClientSocket

func CreateClientSocket(localAddr *net.UDPAddr) *net.UDPConn

CreateClientSocket in client-side

func ReceiveAckFromServer

func ReceiveAckFromServer(buf []byte)

ReceiveAckFromServer any packet

func ReceiveFromServer

func ReceiveFromServer(conn *net.UDPConn, buf []byte, addr *net.UDPAddr, algo string)

ReceiveFromServer any ack packet

func SendToServer

func SendToServer(conn *net.UDPConn, servAddr, localAddr *net.UDPAddr, window int, filename string, flogc *os.File)

SendToServer the filename of the needed file

Types

This section is empty.

Jump to

Keyboard shortcuts

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