server

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: 12 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSerSocket

func CreateSerSocket(servAddr *net.UDPAddr, flog *os.File) *net.UDPConn

CreateSerSocket in the server-side

func GBN

func GBN(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, window int, plp float32, AckCheck chan uint32)

GBN is the go-back-n algorithm

func ListenOnSocket

func ListenOnSocket(windowSize int, algo string, p float32, socketAddr *net.UDPAddr, rcvAddr *net.UDPAddr, packet *socket.Packet)

ListenOnSocket is a goroutine to make every client is handled by a separate socket

func ReceiveAckFromClients

func ReceiveAckFromClients(packet *socket.AckPacket, AckCheck chan uint32)

ReceiveAckFromClients any packet

func ReceiveReqFromClients

func ReceiveReqFromClients(conn *net.UDPConn, packet *socket.Packet, addr, socketAddr *net.UDPAddr, windowSize int, algo string, plp float32, AckCheck chan uint32)

ReceiveReqFromClients any packet

func SR

func SR(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, window int, plp float32, AckCheck chan uint32)

SR is the algorithm of selective-repeat

func SW

func SW(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, plp float32, AckCheck chan uint32)

SW is the algorithm of stop-and-wait

func SendAckToClient

func SendAckToClient(conn *net.UDPConn, addr, socketAddr *net.UDPAddr, packet *socket.Packet)

SendAckToClient is for sending ack packet on received packet for requested file

func SendToClient

func SendToClient(conn *net.UDPConn, window int, addr, socketAddr *net.UDPAddr, algo, filename string, plp float32, AckCheck chan uint32, packet *socket.Packet)

SendToClient is a function to make the packets and prepare them to be sent to clients

Types

This section is empty.

Jump to

Keyboard shortcuts

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