pyrudp
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 help will be really appreciated -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco jaoro...@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 -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just not arive. Some programmers said I most use TCP, but I need to use UDP. that´s why I need pyrudp, but I can not find it. On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco 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 -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On 01/30/2013 10:02 AM, Jorge Alberto Diaz Orozco wrote: I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just not arive. Some programmers said I most use TCP, but I need to use UDP. that´s why I need pyrudp, but I can not find it. Excuse me for chuckling, but your complaint that UDP packets can arive disorganised or just not arive describes exactly what UDP does by design! If you need to use UDP then you will have to live with this. I always consider UDP to stand for UNRELIABLE datagram packets. They can and do come in any order, or not at all. That's exactly the expected behavior of UDP. If you want to build a reliable connection on top of UDP you'll have to invent some sort of tcp-like protocol that uses UDP packets. An example of a real all that does this is openvpn. The Bell Labs Plan 9 RUDP protocol is probably what you were shooting for by trying to use the non-existent pyrudp code. But I fear you'll have to implement it yourself. pyrudp is an empty project on Google Code. The owner intended to develop some code but never did. -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
Have you seen http://pyraknet.slowchop.com/? It appears to do a similar thing. On 30 January 2013 17:02, Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I´ve tried it but it´s not reliable. Datagrams can arive disorganised or just not arive. Some programmers said I most use TCP, but I need to use UDP. that´s why I need pyrudp, but I can not find it. On Jan 30, 2013, at 8:12 AM, Jorge Alberto Diaz Orozco 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 -- http://mail.python.org/mailman/listinfo/python-list -- Robert K. Day robert@merton.oxon.org -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. - Original Message - From: Michael Torrie torr...@gmail.com To: python-list@python.org Sent: Wednesday, January 30, 2013 9:16:15 AM Subject: Re: pyrudp Excuse me for chuckling, but your complaint that UDP packets can arive disorganised or just not arive describes exactly what UDP does by design! If you need to use UDP then you will have to live with this. I always consider UDP to stand for UNRELIABLE datagram packets. They can and do come in any order, or not at all. That's exactly the expected behavior of UDP. If you want to build a reliable connection on top of UDP you'll have to invent some sort of tcp-like protocol that uses UDP packets. An example of a real all that does this is openvpn. The Bell Labs Plan 9 RUDP protocol is probably what you were shooting for by trying to use the non-existent pyrudp code. But I fear you'll have to implement it yourself. pyrudp is an empty project on Google Code. The owner intended to develop some code but never did. -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. utalk (long since disappeared from the surface of the internet) did have such an implementation, and I once wrote a half-cooked python implementation of its semi-reliable protocol over UDP. Nowadays, I'd recommend using openvpn, or perhaps investigate the possibility of PPP over UDP, or maybe look into SCTP. -- --- | Radovan Garabík http://kassiopeia.juls.savba.sk/~garabik/ | | __..--^^^--..__garabik @ kassiopeia.juls.savba.sk | --- Antivirus alert: file .signature infected by signature virus. Hi! I'm a signature virus! Copy me into your signature file to help me spread! -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On 01/30/2013 02:55 PM, Jorge Alberto Diaz Orozco wrote: I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. It's nice to want but what is your actual condition/problem? Are you trying to re-invent the wheel, implement a senior project, or are you trying to work around some administrative or technical restriction against tcp? What's the use case? Do you have control over both ends? Are you writing both ends of the imitation tcp you're writing? One of the car magazines published a road test of the Mercedes GT (garbage truck). It had plenty of power, but its top speed was 6 mph, and it leaned horribly around the pylon obstacle course. Not what I'd take to the race track. Point is that a definitive specification of requirements will be much more useful than a simple wanna. -- DaveA -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On Thu, Jan 31, 2013 at 6:55 AM, Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I want to use a reliable UDP connection like you say, a TCP like connection but over UDP. thaks for your recomendation, if I get good results I promise to share them. To get something reliable over UDP, you're going to need to acknowledge everything you're sent, and if you don't hear back an acknowledgement, re-send. Basically reimplement TCP, or parts of it. Why do you need to use UDP? I've used UDP for a number of purposes, but usually in a fire and forget system. For instance, my latest use of it was a peer-to-peer self-healing network; each node would broadcast a periodic UDP packet saying Hi, I'm here, and here's my current status, and each node would keep track of the timestamp when it last received such a packet from each known IP address. If the time-since-last-received exceeds three broadcast intervals, the node is considered to be dead. But for this to work, I have to not care about individual packet loss; there is no data in the packet that won't be repeated in the next one. This is a reliable *system* built on UDP. Can you explain your goals and restrictions? Might help us figure out how to advise. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I have control over both endpoints, and I´m writing both of them. I just don´t want to re-invent the wheel and I´m looking for a reliable UDP sockets implementation for Python so I can start from there. _ It's nice to want but what is your actual condition/problem? Are you trying to re-invent the wheel, implement a senior project, or are you trying to work around some administrative or technical restriction against tcp? What's the use case? Do you have control over both ends? Are you writing both ends of the imitation tcp you're writing? One of the car magazines published a road test of the Mercedes GT (garbage truck). It had plenty of power, but its top speed was 6 mph, and it leaned horribly around the pylon obstacle course. Not what I'd take to the race track. Point is that a definitive specification of requirements will be much more useful than a simple wanna. -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I have control over both endpoints, and I´m writing both of them. I just don´t want to re-invent the wheel and I´m looking for a reliable UDP sockets implementation for Python so I can start from there. Then... I think the place to start is here: http://www.ietf.org/rfc/rfc793.txt ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On Thu, Jan 31, 2013 at 3:26 PM, w...@mac.com wrote: Now, the good news is that because UDP-based protocols all run in user memory space (as opposed to TCP that runs privileged in kernel space) it is relatively straightforward for non-privledged users to write and test UDP transport schemes and this has become a fairly standard CS exercise at the graduate level. If I were in your shoes, I'd start Googling for the papers published on protocols like HURRICANE, ATAU, or even just the general subject of UDP transport protocols. I'd still include reading up on TCP. The RFC has a good bit about why things are the way they are; when you're designing a protocol that does similar things, it's worth getting an understanding of what your predecessors did. Either you'll get some ideas (yeah, that's how I'll do it!) or you'll decide you can do better, but it's still worth a read. ChrisA -- http://mail.python.org/mailman/listinfo/python-list
Re: pyrudp
On Jan 30, 2013, at 7:14 PM, Chris Angelico ros...@gmail.com wrote: On Thu, Jan 31, 2013 at 11:04 AM, Jorge Alberto Diaz Orozco jaoro...@estudiantes.uci.cu wrote: I have restrictions in my system that does not allow me to use TCP, so I want to make a pipe over UDP imitating TCP behavior. I have control over both endpoints, and I´m writing both of them. I just don´t want to re-invent the wheel and I´m looking for a reliable UDP sockets implementation for Python so I can start from there. Then... I think the place to start is here: http://www.ietf.org/rfc/rfc793.txt ChrisA -- http://mail.python.org/mailman/listinfo/python-list I think you really ought to think about this long and hard. Although TCP started as a fairly simple-minded protocol designed to guarantee reliable delivery of packets in the order in which they were transmitted, it has evolved considerably over the years. It now incorporates concepts of fairness and a very sophisticated rate control system that is constantly probing available network bandwidth to be sure it isn't over driving or hogging the network connection. It would be easy to say: I really don't need all that - all I'm doing is X. - but in reality you do, and getting reliable delivery over UDP really does require it all. Now, the good news is that because UDP-based protocols all run in user memory space (as opposed to TCP that runs privileged in kernel space) it is relatively straightforward for non-privledged users to write and test UDP transport schemes and this has become a fairly standard CS exercise at the graduate level. If I were in your shoes, I'd start Googling for the papers published on protocols like HURRICANE, ATAU, or even just the general subject of UDP transport protocols. Two places you might start are: http://www.ogf.org/documents/GFD.55.pdf and http://www.ornl.gov/~webworks/cppr/y2001/rpt/121150.pdf Most, if not all of these UDP schemes are in the public domain, have been written in high-level languages, and could be translated into python. -Bill -- http://mail.python.org/mailman/listinfo/python-list