module: ‘server_udp.py’

class gwa.eperf.server_udp.UDPServer(address)[source]
closeSocket()[source]

This function “closeSocket” allows to close TCP and UDP sockets.

createSocket(address, protocol)[source]

The function “createSocket” allows the creation of a socket UDP or TCP and returns the socket created. It takes 2 arguments : - “addr” : a tuple of the server’s IP address and the port - “protocol” : type of the socket (“SOCK_DGRAM” or “SOCK_STREAM”)

downloadUDP()[source]

The function “downloadUDP” allows to send data with a random size during the “duration” informed by the user. It sends data with a rate forced every second to the bandwidth given by the user.

parameters()[source]

The function “parameters” allows to recover parameters from the client (“interval”, “duration”, “bandwidth”, “upload” and “download”). Before recovering parameters, the function does a synchronization with the client sending a start message. This function tests also if the input bandwidth exceeds the maximum buffer of the function “sendto()”.

uploadUDP()[source]

This function “uploadUDP” allows to count the size of received data during every interval and calculate the bandwidth for each interval It adds every measure of the bandwidth in a list called “listFinal”.

Previous topic

module: ‘client_udp.py’

Next topic

module: ‘function.py’

This Page