Peach :: Publishers :: udp :: Udp :: Class Udp
[hide private]

Class Udp

source code


A simple UDP publisher.

Instance Methods [hide private]
 
__init__(self, host, port, timeout=None) source code
 
stop(self)
Close connection if open
source code
 
close(self) source code
 
connect(self) source code
 
send(self, data)
Send data via sendall.
source code
string
_receiveBySize(self, size)
This is now a buffered receiver.
source code
string
_receiveByAvailable(self)
Receive as much as possible prior to timeout.
source code
 
receive(self, size=None) source code
Method Details [hide private]

__init__(self, host, port, timeout=None)
(Constructor)

source code 
Parameters:
  • host (string) - Remote hostname
  • port (number) - Remote port

send(self, data)

source code 

Send data via sendall.

Parameters:
  • data (string) - Data to send

_receiveBySize(self, size)

source code 

This is now a buffered receiver.

Returns: string
received data.

_receiveByAvailable(self)

source code 

Receive as much as possible prior to timeout.

Returns: string
received data.