Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: pyrudp (http://www.velocityreviews.com/forums/t957088-re-pyrudp.html)

Rodrick Brown 01-30-2013 01:45 PM

Re: pyrudp
 
On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco
<jaorozco@estudiantes.uci.cu> wrote:

> can someone give me a link to download pyrudp.
> I tried here http://code.google.com/p/pyrudp/ but didnīt worked.
>
> if someone can give me another idea it will be great to.
> Iīm traying to make a reliable udp connection


What about the native socket call to SOCK_DGRAM?

Here is a simple example to read messages of a udp socket.

import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5005

sock = socket.socket(socket.AF_INET, # Internet
socket.SOCK_DGRAM) # UDP
sock.bind((UDP_IP, UDP_PORT))

while True:
data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
print "received message:", data

>
> help will be really appreciated
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list



All times are GMT. The time now is 05:44 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.