Questions tagged [datagram]

A datagram is a unitary message delivered entire over a network, typically via UDP, and typically with no guarantee on order or reliability of message delivery.

Datagrams support connection-less messages of a fixed maximum length. While datagrams allow for a bi-directional data flow, the order and reliability of message delivery is not guaranteed. A process receiving datagrams may find messages duplicated or missing or in an order different than the order sent. However, record boundaries in data are respected. Datagrams closely model the facilities found in many contemporary packet-switched networks.

630 questions
5
votes
1 answer

NodeJS Datagram - Receive IPv6 multicast

I'm trying to receive multicast datagrams over IPv6 in node.js. I had no problems doing it exactly same way over IPv4 (udp4), but trying to do the same for udp6 gives me EINVAL Errors on socket.addMembership call. Here is my code: var dgram =…
5
votes
1 answer

How to split received with boost asio udp sockets united datagrams

I've made my UDP server and client with boost::asio udp sockets. Everything looked good before I started sending more datagrams. They come correctly from client to server. But, they are united in my buffer into one message. I use…
valery_l
  • 101
  • 3
4
votes
3 answers

How to make two-directional unix domain sockets with SOCK_DGRAM?

I am trying to write a simple Unix datagram server/client, and am having some problems. What I want is a server that listens on a datagram socket and sends a reply to every message received, to the original sender. I decided to try first using socat…
fyhuang
  • 2,147
  • 5
  • 21
  • 24
4
votes
3 answers

Send multiple datagrams using a single send() call?

When datagram-based socket (raw socket or UDP) is used with gather-style send, all the data are concatenated to form a single IP packet. Is there a way to send several datagrams using a single call?
martin
4
votes
0 answers

UDP packet lost between virtualbox guest and windows host

The windows (win7/x64) host uses IP 192.168.56.1 on its "VirtualBox Host-Only Network adapter". The linux (Debian 8) Virtualbox guest is configured as 'host-only networking'. It uses static IP address 192.168.56.100. Host and guest can ping each…
Francois
  • 2,005
  • 21
  • 39
4
votes
1 answer

Is there a way to reduce the minimum lower limit of the socket send buffer size?

I'm trying to change the default socket send buffer size to a small size, in order to see how the UDP throughput gets affected for small UDP datagrams. To do this, I use the setsockopt function with the option SO_SNDBUF and I am trying to set the…
Thanasis Petsas
  • 4,378
  • 5
  • 31
  • 57
4
votes
1 answer

Datagramsocket: how receive(...) handles fragmentation of a packet

I came to know from my Professor that, a datagram packet sent using UDP socket gets fragmented in the lower layers and may arrive as multiple packets at the receiver end. For e.g, if I send a 1000 bytes data in a datagram packet, at the receiving…
arun
  • 137
  • 3
  • 10
4
votes
1 answer

Maintaining a bidirectional UDP connection

I'm writing an Android UDP client that connects to and communicates bidirectionally (with no relationship between sent and received messages) with a Windows server. Once the initial Datagram has been sent to the server I want to be able to send data…
Funky Oordvork
  • 403
  • 4
  • 15
4
votes
2 answers

Port Unreachable when using Datagram Channel

While using Datagram Channel I get a PortUnreachableException. This is what my Codes look like : This is the sender side //Open a non-blocking socket to send data to Receiver DatagramChannel channel =…
Aditya
  • 195
  • 3
  • 4
  • 12
4
votes
1 answer

What are the Netty Channel state transitions?

Netty channels have multiple states but I am unable to find any documentation on the actual state transitions. The closest to any documentation on this that I could find for Netty 3.2.x system is here. I was able to locate the possible states that…
Kevin Sitze
  • 8,029
  • 3
  • 16
  • 19
3
votes
3 answers

Disconnect and Reconnect a connected datagram socket

Iam trying to create an iterative server based on datagram sockets (UDP). It calls connect to the first client which it gets from the first recvfrom() call (yes I know this is no real connect). After having served this client, I disconnect the UDP…
codymanix
  • 28,510
  • 21
  • 92
  • 151
3
votes
4 answers

How to get rid of the empty remaining of the buffer?

I have a server-client application that is using a datagram socket to exchange messages. I have initially set the buffer size to be 1024 bytes because I dont know the length of the messages. When I send something that is shorter than 1024 bytes I…
Miky
  • 942
  • 2
  • 14
  • 29
3
votes
2 answers

Byte buffer transfer via UDP

Can you provide an example of a byte buffer transferred between two java classes via UDP datagram?
none
3
votes
2 answers

Android - send DatagramSocket max buffer size

I have an app that sends data over UDP. I'm trying to find out what is the max/optimal send buffer size. I have succeedded sending a 2k package, but bigger packets was a problem. I tried using getSendBufferSize to see what is the send buffer size.…
bahar_p
  • 441
  • 1
  • 8
  • 18
3
votes
4 answers

Is this statement correct in java?

I would like to do a data transfer between two computers using datagram socket.Iam using the following line this way : host=InetAddress.getByAddress("mypc",new byte[]{192,168,1,110}); but when i use the above statement i get this error :"Possible…
arshad
  • 441
  • 4
  • 7
  • 14