Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
udp
#1
has anyone here done any python programming of udp (user datagram protocol) or of any applications (written in python) that stack their protocol on udp? ... even if it uses a module to do the network code (hopefully the module is in python and distributed as .py files)?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
If you have written anything for DNS, DHCP, SNMP, etc. you have (or at least should have) worked with UDP. If you require a fast service, with very little error checking, no response required from the receiving end and no need for ordered packets, then UDP is the way to go.

I'm not sure, as I've never used Pythons 'socket' library, but would imagine it has a way to deal with UDP.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Yes, socket module can deal with the datagram protocol.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#4
but have you done any udp programming?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#5
No. I didn't need such a program so far.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
i was curious if anyone has run into problems with UDP other than the expected (lost datagrams, duplicate datagrams, out of order datagrams, significantly lagged datagrams) and in particular problems that might be Python specific (inconsistent data types, strange exceptions, bytes vs. strings issues).

one component i plan to make is a datagram relay program. it would be given a host (optional) and port to receive from and a host (optional) and port to send to. when a datagram is received, it is sent on to the designated location (which may be back to the source host). i have already done this kind of thing in C and with the socat program (a fantastic tool). i now have ideas i want to add on to that which are out of scope for socat. if i were not doing Python coding these days, i'd be doing this in C. but it makes more sense to do it in Python.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020