UDP Stream Objects -- Python library reference
Prev: TCP Status Objects
Up: mactcp
Top: Top
14.9.3. UDP Stream Objects
Note that, unlike the name suggests, there is nothing stream-like
about UDP.
- asr -- attribute of UDP stream
-
The asynchronous service routine to be called on events such as
datagram arrival without outstanding
Read
call. The asr
has a
single argument, the event code.
- port -- attribute of UDP stream
-
A read-only member giving the port number of this UDP stream.
- Read (timeout) -- Method on UDP stream
-
Read a datagram, waiting at most timeout seconds ( is
infinite). Return the data.
- Write (host, port, buf) -- Method on UDP stream
-
Send buf as a datagram to IP-address host, port
port.
Prev: TCP Status Objects
Up: mactcp
Top: Top