Package brisa :: Package core :: Module network_senders :: Class UDPTransport
[hide private]
[frames] | no frames]

Class UDPTransport

source code

object --+
         |
        UDPTransport

Provides methods for sending UDP datagrams.

Instance Methods [hide private]
 
__init__(self, TTL=2)
Constructor for the UDPTransport.
source code
 
set_TTL(self, TTL)
Setter for the time to live parameter.
source code
 
send_data(self, data, host, port)
Sends an UDP datagram to the address specified.
source code
 
send_delayed(self, delay, data, host, port)
Sends an UDP datagram to the address specified after the delay.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, TTL=2)
(Constructor)

source code 

Constructor for the UDPTransport.

Parameters:
  • TTL (integer) - time to live. Default is 2
Overrides: object.__init__

set_TTL(self, TTL)

source code 

Setter for the time to live parameter.

Parameters:
  • TTL (integer) - time to live

send_data(self, data, host, port)

source code 

Sends an UDP datagram to the address specified.

Parameters:
  • data (string) - raw data
  • host (string) - target host
  • port (integer) - target port

send_delayed(self, delay, data, host, port)

source code 

Sends an UDP datagram to the address specified after the delay.

Parameters:
  • delay (float) - delay to wait before sending
  • data (string) - raw data
  • host (string) - target host
  • port (integer) - target port