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

Send And Receive string between Arduino and iOS Device via UDP

I need to send and receive data between Arduino and iOS Device via UDP. Can I use example from official Arduino site: http://arduino.cc/en/Tutorial/UDPSendReceiveString. If yes, how can send strings from iOS device. Help me please.
user1996377
3
votes
1 answer

Boost::asio UDP Broadcast with ephemeral port

I'm having trouble with udp broadcast transactions under boost::asio, related to the following code snippet. Since I'm trying to broadcast in this instance, so deviceIP = "255.255.255.255". devicePort is a specified management port for my device. I…
OcularProgrammer
  • 482
  • 2
  • 5
  • 19
3
votes
0 answers

Android udp multicast with Ethernet

Hello everyone, I'm working on a project with udp multicast. I have a server sending multicast udp packets via an ethernet cable. I have spent weeks of work reading all the posts about multicast on android and I still can't receive any udp packet on…
MultiJazz
  • 31
  • 5
3
votes
1 answer

Sending small UDP packets from the Linux Kernel to LOOPBACK

Situation: My code is basically hacked into a driver of the Linux Kernel. I want to notify an application in user space about noteworthy raw events before they get fired off to the main system. Steps for Solution: I found a nice example for a…
Robin Gawenda
  • 559
  • 5
  • 21
3
votes
2 answers

python udp client time out machinsm

My client socket would suspend in receving data if the rand number generated in Server socket less than 4. I need to set up time out mechanism to allow client socket detect there is "time out" and then it would continue send message. After I run the…
shen
  • 31
  • 1
  • 1
  • 3
3
votes
3 answers

UDP Connections on same computer . 1 Server . Multiple Clients

Working on Qt Framework .., need to get a solution on given requiremets I have made one server and 2 clients my PC: IP1, IP2, IP3 are ports. My server is listening on IP1, port number 9999 I want to send data(datagram) to Server, then server need to…
3
votes
1 answer

i have two android apps ,one can send the string over LAN at specific IP and other app for receiving but i want to broadcast the string over LAN?

I want to broadcast the string over LAN, but when I change the server IP in client code to 255.255.255.255 it doesn't broadcast. What shall I do in order to broadcast the string over LAN? What shall I do in client code so that all the listening…
Talib
  • 1,134
  • 5
  • 31
  • 58
3
votes
0 answers

Why is my android receiver dropping 10-60% of UDP broadcast packets?

I have an 802.3 wired transmitter application on my computer that I've written to broadcast UDP packets every 10ms. Each broadcast packet contains a 4-byte integer value that is unique to its particular packet, which allows me to figure out on the…
JLindsey
  • 700
  • 2
  • 7
  • 14
3
votes
1 answer

Sending multicast UDP and waiting for responses

In my network I have several devices (linux, c++) and one android smartphone. Now, in order to recognize the devices in the network I am sending out a multicast udp packet from the android smartphone with the following code: public class SSDPSocket…
Moonlit
  • 5,171
  • 14
  • 57
  • 95
3
votes
2 answers

python change max limit recv buffer in UDPServer

I use UDPServer based on BaseServer to receive frag UDP packets . But some packets are larger than 8192 bytes(@handle method, print len(data)), and I can't use them correctly. My original code: class MyUDPHandler(SocketServer.BaseRequestHandler): …
user1778354
  • 323
  • 2
  • 14
3
votes
1 answer

How to fetch address from CocoaAsyncUDPSocket

Does anyone know how the delegate method for receiving UDP data in CocoaAsyncSockets work when it comes to fetching the source address? Specifically the method -(void)udpSocket:(GCDAsyncUdpSocket *)sock didReceiveData:(NSData *)data…
Rick
  • 3,240
  • 2
  • 29
  • 53
3
votes
2 answers

Measure the delay between data sent by udp server and received by the client

I want to check my udp server client application. One of the features that I wanted to check is the time delay between data sent by the server and received by the client and vice versa. I figured out a way of sending a message from the server to the…
Ayse
  • 2,676
  • 10
  • 36
  • 61
3
votes
2 answers

Node.js Readable Stream _read Usage

I understand how to use writable streams in Node's new Streams2 library, but I don't understand how to use readable streams. Take, for example, a stream wrapper around the dgram module: var dgram = require('dgram'); var thumbs = { twiddle:…
skeggse
  • 6,103
  • 11
  • 57
  • 81
3
votes
1 answer

Android - constantly listening to UDP socket

My application based on constant client-server communication. I'm trying to do that using service and alarmmanager. I'm puting while(true) loop in onStartCommand() method in order to keep listening to specific port using DataGramSocket. My problem…
user1080528
  • 75
  • 1
  • 6
3
votes
2 answers

Java nio udp broadcast

I try to implement a UDP client server detection via broadcast. The idea is the following: I have a server, which is bound to port 12344 and a client which is bound to port 12345. Now, the client sends a broadcast package to 255.255.255.255 12344.…
morpheus05
  • 4,772
  • 2
  • 32
  • 47
1 2 3
99
100