Re: pyrudp

Discussion in 'Python' started by Rodrick Brown, Jan 30, 2013.

  1. On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco
    <> 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
     
    Rodrick Brown, Jan 30, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jorge Alberto Diaz Orozco

    pyrudp

    Jorge Alberto Diaz Orozco, Jan 30, 2013, in forum: Python
    Replies:
    0
    Views:
    107
    Jorge Alberto Diaz Orozco
    Jan 30, 2013
  2. Jorge Alberto Diaz Orozco

    Re: pyrudp

    Jorge Alberto Diaz Orozco, Jan 30, 2013, in forum: Python
    Replies:
    0
    Views:
    136
    Jorge Alberto Diaz Orozco
    Jan 30, 2013
  3. Michael Torrie

    Re: pyrudp

    Michael Torrie, Jan 30, 2013, in forum: Python
    Replies:
    0
    Views:
    107
    Michael Torrie
    Jan 30, 2013
  4. Rob Day

    Re: pyrudp

    Rob Day, Jan 30, 2013, in forum: Python
    Replies:
    0
    Views:
    138
    Rob Day
    Jan 30, 2013
  5. Jorge Alberto Diaz Orozco

    Re: pyrudp

    Jorge Alberto Diaz Orozco, Jan 30, 2013, in forum: Python
    Replies:
    1
    Views:
    141
Loading...

Share This Page