Questions tagged [udp]

User Datagram Protocol is one of the messaging protocols of the IP protocol stack. With UDP, computer applications can send messages to other hosts on an Internet Protocol (IP) network without requiring prior communications to set up special transmission channels or data paths.

UDP uses a simple transmission model without implicit handshaking dialogues for providing reliability, ordering, or data integrity. Thus, UDP provides an unreliable service and datagrams may arrive out of order, appear duplicated, or go missing without notice.

UDP assumes that error checking and correction is either not necessary or performed in the application or at the hardware level (layer 1 and 2), avoiding the overhead of such processing at the network interface level.

Time-sensitive applications often use UDP because dropping packets is preferable to waiting for delayed packets, which may not be an option in a real-time system.

There is more information at the Wikipedia article on UDP.

10654 questions
3
votes
1 answer

Secure UDP Socket Programming

What are good programming practices in regards to blocking DoS attacks on a UDP client/server? The only thing that comes to mind at the moment is ignoring packets with the wrong sources, as such (using WinSock2): if (oSourceAddr.sa_family ==…
NmdMystery
  • 2,778
  • 3
  • 32
  • 60
3
votes
2 answers

Python UDP socket port random, despite assignment

I have two simple Python files: client.py and server.py. The client simply sends the text you type to the server, via UDP socket. The port assigned and listened to is 21567, BUT... the line reading: print "\nReceived message '", data,"' from ",…
josef.van.niekerk
  • 11,941
  • 20
  • 97
  • 157
3
votes
1 answer

UDP Benchmark for Memcached

I am looking for an Open source UDP Benchmarking client for Memcached Server. If any one knows of any one that would be of great help. We are trying to write our own client but somehow it is working for TCP but not for UDP. I am actually looking for…
Udit Gupta
  • 3,162
  • 11
  • 43
  • 71
3
votes
1 answer

Sending Info Hash to Bittorrent Tracker Over UDP

So I'm writing a Bittorrent client in C++ and I can communicate with the tracker, however when I get the announce response my IP address is the only one I get in return. After looking at my traffic over wireshark and comparing it to the traffic to…
Ethan
  • 1,206
  • 3
  • 21
  • 39
3
votes
0 answers

Realtime video conversion using nodejs and ffmpeg

I'm trying to create very simple server-side video conversion using ffmpeg and nodejs. So far, I have 2 UDP servers, one for converting video input and second one for listening for converted video and passing it to websocket. I've created one UDP…
LadislavM
  • 414
  • 1
  • 6
  • 22
3
votes
1 answer

Android Wifi Direct Multicast issue

I am currently working on using multicast on a network to send a message (from one Android Device) on the network to all other Android devices including itself. It works as required when both phones are connected via the local WiFi network. I.e…
Richard Lewin
  • 1,870
  • 1
  • 19
  • 26
3
votes
4 answers

Is this the correct way to handle partial reads of UDP messages?

So in the case of TCP streams, one needs to keep track of how much is read of the message by each recv call. Partial reads can then be pieced together and ultimately the message can be received ok. But for UDP messages, how should partial reads be…
c00kiemonster
  • 22,241
  • 34
  • 95
  • 133
3
votes
2 answers

Why UDP checksum contains the UDP length twice?

I was trying to understand UDP checksum mechanism. I am using this packet. I saw an example that in summation of all field, UDP length is included twice. Why we need to include UDP length twice in the checksum ? This is the example I saw IP header:…
Hardik
  • 335
  • 2
  • 5
  • 12
3
votes
0 answers

Android: UDP Packets not reaching CDMA Device

Referred to this link and i have done sample Client/Server Apps using android.The apps work well on GSM sim's able to send and receive packets,but on CDMA device i am not able to receive any packets but able to send packets. Ip address details is…
NitZRobotKoder
  • 1,046
  • 8
  • 44
  • 74
3
votes
1 answer

Multi threaded UDP socket programming in Java

i just designed an application in Java to enable chat between multiple clients using one server. I used UDP sockets and multithreading. I had some questions about that: Client side code: private void sendMessage(String s) throws Exception { …
previouslyactualname
  • 703
  • 2
  • 11
  • 25
3
votes
0 answers

How to detect UDP socket receive buffer overflow from application?

When the application does not recv the datagrams fast enough, receive buffer gets exhausted and packets get dropped, incrementing /proc/net/snmp's InErrors counter. How the receiving application can know that some datagrams are skipped because of…
Vi.
  • 37,014
  • 18
  • 93
  • 148
3
votes
1 answer

nc -u 192.168.1.255 9999 fails

I am trying to broadcast to 192.168.1.255 which is my broadcast address. ifconfig says eth0 Link encap:Ethernet HWaddr 50:e5:49:51:0b:cb inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr:…
Neel Basu
  • 12,638
  • 12
  • 82
  • 146
3
votes
3 answers

Testing UDP on localhost

I'm currently trying to make an online video game, which currently uses TCP to send packets. I want to use UDP, but I'm extremely new to UDP and I'm having some issues. When I test my server/client(s) on the same computer (localhost), the packets…
Brad
  • 10,015
  • 17
  • 54
  • 77
3
votes
3 answers

sending and receiving UDP packet on datagram socket in android

I have two classes,one sender class and the other is the receiver class.Both of the sending and receiving apps stops after few seconds and close down. My sender class is : public class MainActivity extends Activity { InetAddress…
Ameer Humza
  • 83
  • 1
  • 3
  • 13
3
votes
2 answers

Android udp packets loss

I am facing weird problem in receiving udp packets on Sony Xperia Z tablet. My application didn't receive many udp packets. So I have rooted the tablet to install the shark app and captured the network traffic using shark app after rooting the…
jkstar
  • 467
  • 2
  • 7
  • 19
1 2 3
99
100