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
2 answers

Are UDP messages atomic?

If I send some sequence of bytes on a UDP socket (ie, in a single send call), is it possible that the receiving socket will receive only part of the transmitted message (ignoring the case of too small a buffer). Or will the byte sequence be…
alecbz
  • 6,292
  • 4
  • 30
  • 50
3
votes
2 answers

Python - Is sendto()'s return value useless?

In my recent project, I need to use the UDP protocol to transmit data. If I send data by using size = s.sendto(data, (, )), will the UDP protocol ensure that the data is packed into one UDP packet? If so, will size == len(data) always be…
YON
  • 1,607
  • 3
  • 18
  • 33
3
votes
1 answer

Python UDP packets never arrive

The last couple of days I spent trying to figure out how to send data back and forth via UDP (I have plans for a simple multiplayer game). So far so good, until I realized it only works fine over LAN but none of the packets ever arrive over…
3
votes
1 answer

Playing UDP streams in HTML5

This question has come up before but I dont see any uptodate information. I am receiving a UDP stream which I want to display in a browser using HTML5. The stream is UDP multicast for general TV channels, which is in H.264 format. Can I do that?
user3392740
  • 445
  • 2
  • 7
  • 19
3
votes
2 answers

Should I test UDP server code, and if so - why and how?

I don't have much experience doing unit testing. From what I learned, code should be decoupled, and I should not strive to test private code, just public methods, setters, etc etc. Now, I have grasped some basic testing concepts, but I have troubles…
mr.b
  • 4,932
  • 11
  • 38
  • 55
3
votes
1 answer

Voice Conference - how to have more people in conversation?

first of all, I'm just a hobbyist, so I'm sorry if this is dumb question or if I'm being too naive. (It also means that I can't buy expensive libraries) This is the situation: I'm building a simple voice chat application in C#.NET (something like…
Ken
  • 33
  • 3
3
votes
0 answers

Receive Multicast from own IP

I'm working on an Ethercat master written Go. The underlying library is at http://github.com/distributed/ecat and contains one link level driver, using UDP and multicast. I'm having trouble to get this link level driver to work consistently across…
distributed
  • 366
  • 4
  • 13
3
votes
2 answers

Should I use WebRTC or Websockets (and Socket.io) for OSC communication

I am working on an application that will send OSC control messages, which is, as I understand a datagram packet, from a web page to an OSC Receiver (server), such as Max/MSP or Node or any other. I know typically UDP is used because speed is…
Startec
  • 12,496
  • 23
  • 93
  • 160
3
votes
1 answer

C# socket datagram overflow

I'm new in c# =) I have a litle question about udp socket. I have a chat server that receives packets to a specific structure (udp datagram). Why program receives data when the socket buffer is full? Does all that come after should not be be lost?…
user3327152
  • 33
  • 1
  • 1
  • 4
3
votes
1 answer

Netcat as UDP Client does not receive response packets from Arduino Wifi Shield. Simple C UDP Client Does. Why?

I am testing out the WiFi UDP Send and Receive String example Arduino code with the Arduino Wifi Shield (newest firmware update Mar. 2013), and I'm getting behaviour I cannot explain. Expected Operation The Arduino receives UDP packets on its own…
bazz
  • 413
  • 6
  • 14
3
votes
2 answers

How do I run these two loops simultaneously? (Java)

I'm trying to write a simple console program that allows me to send and receive String messages. The problem I am encountering though, is that I don't know how to run the receiving code and the sending code simultaneously. Individually, the classes…
Daan
  • 65
  • 1
  • 1
  • 6
3
votes
1 answer

How can I listen to UDP ports in Java?

I have to listen 3 different ports for UDP in my Java project. I implemented my system as follows: I have a UDPMessageListener class which implements Runnable. I want to create 3 threads running as this object. I have an interface called…
fercis
  • 611
  • 2
  • 12
  • 26
3
votes
2 answers

local vs remote socket connections on iphone

I want to send OSC messages from iphone to another programme (max/msp) by creating and connecting to a udp socket. this works from the iphone simulator, i.e. when both apps are running on the same computer but not when i install the app on the phone…
Remover
  • 1,616
  • 1
  • 17
  • 27
3
votes
1 answer

UDP Broadcast Reception Problems with Ubuntu 9.04 but not 8.04

Updates 01-27ter: rp_filter information added 01-27bis: Note that the 9.04 box works on a different interface. 01-27: Added interface configuration information and analysis of a packet. Original Post I've got two extremely similar hardware…
cjs
  • 25,752
  • 9
  • 89
  • 101
3
votes
1 answer

How to receive UDP broadcast packets on a PARTICULAR interface?

On an iPhone I have created a UDP socket and bound it to the WLAN interface. I enabled SO_BROADCAST and I am able to send broadcast packets to the network (confirmed by a client running on my notebook.) But the UDP socket on the iPhone is unable to…
Michael
  • 6,451
  • 5
  • 31
  • 53