Documentation
¶
Index ¶
- func CreateSerSocket(servAddr *net.UDPAddr, flog *os.File) *net.UDPConn
- func GBN(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, ...)
- func ListenOnSocket(windowSize int, algo string, p float32, socketAddr *net.UDPAddr, ...)
- func ReceiveAckFromClients(packet *socket.AckPacket, AckCheck chan uint32)
- func ReceiveReqFromClients(conn *net.UDPConn, packet *socket.Packet, addr, socketAddr *net.UDPAddr, ...)
- func SR(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, ...)
- func SW(packets []socket.Packet, noChunks int, conn *net.UDPConn, addr *net.UDPAddr, ...)
- func SendAckToClient(conn *net.UDPConn, addr, socketAddr *net.UDPAddr, packet *socket.Packet)
- func SendToClient(conn *net.UDPConn, window int, addr, socketAddr *net.UDPAddr, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSerSocket ¶
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 ¶
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 ¶
SendAckToClient is for sending ack packet on received packet for requested file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.