udp package header
Nick Craig-Wood
nick at craig-wood.com
Tue Mar 24 05:30:03 EDT 2009
mete <metebilgin48 at gmail.com> wrote:
> I got a problem. İ want to send udp package and get this package (server and
> clinet ). it's easy to python but i want to look the udp header how can i
> do ?
There is pretty much nothing in a UDP packet header except
from_address, to_address, from_port and to_port. You should already
know to_address and to_port and socket.recv will give you the
from_address and from_port
socket.recvfrom(bufsize[, flags])
Receive data from the socket. The return value is a pair (string,
address) where string is a string representing the data received
and address is the address of the socket sending the data.
--
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list
mailing list