Questions tagged [udpclient]

UdpClient (System.Net.Sockets.UdpClient) is a .NET-Class allowing to send and receive UDP-Traffic.

575 questions
1
vote
1 answer

Unable to get UDP.BeginReceive to work in WPF

I have no trouble using a UDPClient's BeginReceive method from a console application. However, I am not able to get this to run from my WPF app. I'm very confused. I am assuming that it has something to do with where I am calling this code from. I…
Goku
  • 1,565
  • 1
  • 29
  • 62
1
vote
1 answer

What needs to be done to receive UDP datagrams in UWP app?

In my Xamarin.Forms app for UWP I have the following simple code to receive a UDP datagram: using (var udpClient = new UdpClient(port)) { var datagram = await udpClient.ReceiveAsync(); } For testing purposes I need to run this app from within…
Robert Hegner
  • 9,014
  • 7
  • 62
  • 98
1
vote
0 answers

UDP Packet can be seen on wireshark, not seen from output of code

I am trying to receive packet from UDP-connected infrared camera. (FLIR Lepton 2.5) And I'm trying to run my codes on Windows 10, Qt Creator 4.5, Qt 5.9. As you can see on the capture below, my UDP-connected infrared camera sends UDP packets. And…
Jinhyeok
  • 21
  • 3
1
vote
0 answers

C# UdpClient socket. How to get the Packet Identification number

I have a UdpClient socket that receives UDP packets. Sample code below. var clientSocket = new UdpClient(ipLocalEndPoint); clientSocket.Connect(serverIp, port); while (true) { var ipEndPoint = new IPEndPoint(IPAddress.Any, 0); var data =…
Frank
  • 431
  • 1
  • 5
  • 25
1
vote
2 answers

UDP client / server ....include 16-bit message sequence number for filtering duplicates

my assignment includes sending an image file using UDP service (using java I implemented that successfully). My professor asked to include: "The exchanged data messages must also have a header part for the sender to include 16-bit message sequence…
1
vote
0 answers

Can not receive UDP datagram, sended to IPv6 "All Nodes" multicast group

I try send UDP datagram to multicast group "All Nodes" of IPv6 enabled interface (IPv6 address FF02::1, IPv6 Multicast Address Space Registry) in Windows 10, but can't receive it back locally. Example C# code: var a1 = new…
svk
  • 53
  • 1
  • 7
1
vote
1 answer

Qt EventLoop delay with high frequency signal<->slot connections

I'm really going crazy over this and I hope somebody has an answer... I do encounter a strange problem with QUdpSockets and the Signal and Slot Connection. I'm receiving small data packets (64 bytes) at 3 different UdpSockets with 100Hz without any…
jmg
  • 33
  • 1
  • 6
1
vote
0 answers

Udp server receive message from external client as if it is from server IP

I have a UDP Server and client which works on localhost when the server and client are both behind the same router. When connecting from external IP - the IPEndPoint holds the server IP. Server receiver: private void Recv(IAsyncResult res) { …
MatMat
  • 878
  • 3
  • 8
  • 24
1
vote
1 answer

How can iperf reporting packet loss in udp

Iperf is the well known tool to calculate throughput. When i tried udp throughput using iperf on my linuxpc, It reported that 10% of packet loss. In UDP protocol, data gram did not receice any acknowledgements. But, in what way iperf is reporting or…
Vijay Kalyanam
  • 327
  • 1
  • 3
  • 15
1
vote
0 answers

C/C++ Socket UDP Client Data Sending -> Keep sending only one peer

i faced a problem with Multi-UDP Socket. Now I have a PC(192.168.58.200), and 3 MPU(STM32F4)(192.168.85.100~102). and I Conncected RS232 With MPU. When MPU got a messasge, it returns just 'X', and print out same thing with RS232, so i can…
kunbumpark
  • 11
  • 1
1
vote
2 answers

How to reduce C# memory usage for Socket Application

I developed a simple UDP message server and client application in Windows, the server can send a message to the client but the client can't send anything, they are only listening. the problem is the client application is use quite big memory usage…
Keys
  • 11
  • 1
1
vote
1 answer

Mutlcast UDP: Only one usage of each socket address (protocol/network address/port) is normally permitted

I am trying to use UDPClient to listen for multicast IP (UDP port 3000) packets. When I do have the sender program running (which also listens to that port) then I get the following error on line UdpClient listener = …
Dr.YSG
  • 7,171
  • 22
  • 81
  • 139
1
vote
0 answers

C# UdpClient not receiving

I am having some issues with System.Net.Socket's UdpClient today. I'm not sure where I'm going wrong. I have another UWP specific implementation using the Windows namespace which works perfectly, but I can't crack this. I have a server sending UDP…
Rich Logan
  • 39
  • 6
1
vote
2 answers

Observable.FromAsyncPattern & UdpClient C#

i want to be able to use reactive to receive udp packages asynchronously. i've written this block of code. udpServer = new UdpClient(20000); remoteEP = new IPEndPoint(IPAddress.Any, 20000); var read =…
jurasans
  • 151
  • 1
  • 8
1
vote
1 answer

UdpClient Receive does not return until 2nd broadcast

I think this is really weird. Tried to use UdpClient to synchronously receive broadcast msg, but it does not return although the broadcast has completed. Only on subsequent broadcast did I get the message. I think there's a bug somewhere within the…
Kenny
  • 13
  • 2