Questions tagged [udpclient]

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

575 questions
2
votes
1 answer

C#: UdpClient not sending data when calling close() to soon

On some computers I have the strange effect that UdpClient will not send data when UdpClient.Close() is called too soon after a UdpClient.Send(). I'm using .NET 4.0 and WireShark to verify the packet-loss. The essential part of the coding…
Seven
  • 4,353
  • 2
  • 27
  • 30
2
votes
1 answer

Debugging missed broadcast datagrams, which show up in wireshark, but not in C# app?

I have two machines A1 and A2, both of which are running the same embedded code, which broadcast packets. The third machine, B3, is a Windows XP box running a C# (.NET 4.0) app, which listens for those broadcasts. All of the data from A1 is…
John
  • 230
  • 5
  • 16
2
votes
3 answers

Error:Socket Select() function always return zero..?

can any one tell me why the following code always return 0 . the socket descriptor value is 3. i am using the open suse TFTP server . which is listening on port 69 in Local host. connect() function return success .. connection_timer.tv_sec = 2;…
Balamurugan
  • 2,259
  • 8
  • 33
  • 48
2
votes
3 answers

When the client socket should be bound in order to receive UDP messages from a server?

I have seen two examples that illustrate how the client socket can receive messages from server. Example 1: server code http://man7.org/tlpi/code/online/book/sockets/ud_ucase_sv.c.html client…
q0987
  • 34,938
  • 69
  • 242
  • 387
2
votes
1 answer

DotNet: SocketException (111): Connection refused for UDP on Debian

I'm experiencing a weird problem; I have two applications, a frontend and a backend. The frontend sends messages to the backend using UDP. I have specific reasons to use UDP, but one of them is that I don't care when the backend is down or…
RobIII
  • 8,488
  • 2
  • 43
  • 93
2
votes
2 answers

UDP Broadcast and Receive no responses after Single

Currently trying to access devices on my network by udp. The sendAsync is working properly however on receive I am only getting back a single message. The message returned is the response of the message sent I believe, but all the devices that…
tscLegend
  • 76
  • 11
2
votes
1 answer

How to get local address the kernel assign to a UDP socket with connect()?

Reading the https://www.amazon.com/Unix-Network-Programming-Sockets-Networking/dp/0131411551, chapter 8.14 Determining Outgoing Interface with UDP A connected UDP socket can also be used to determine the outgoing interface that will be used to a…
milanHrabos
  • 2,010
  • 3
  • 11
  • 45
2
votes
1 answer

How to display stream video frames in Qt app using Gstreamer receive from UDP socket

I would like to use Qt Multimedia to display a video stream. I have run @server: $gst-launch-1.0 -v videotestsrc pattern=ball ! video/x-raw,width=1280,height=720 ! jpegenc ! rtpjpegpay ! udpsink name=sink host=localhost port=34400 sync=false…
Pooja
  • 33
  • 1
  • 7
2
votes
1 answer

F# UDP sending bytes raises System.ArgumentOutOfRangeException error

so I have the following F# code below which should create a UDP client and it should be able to send and receive information. However, when I run it, I get the following error: Unhandled exception. System.ArgumentOutOfRangeException: Specified…
Edelweiss
  • 79
  • 6
2
votes
2 answers

Unable to receive known reply when broadcasting UDP datagrams over LAN using Sockets or UdpClient

I have searched for 2 days and found many, many questions/answers to what appears to be this same issue, with some differences, however none really seem to provide a solution. I am implementing a library for controlling a DMX system (ColorKinetics…
2
votes
2 answers

Non blocking UDP socket .NET "A non-blocking socket operation could not be completed immediately" exception

I have written a small UDP client server class in C# that is used to provide comms between a Linux and a Windows machines. The implementation of the UDP client and server in C# in Windows is a direct rewrite from C++ code I wrote for Linux…
Serge
  • 63
  • 1
  • 1
  • 8
2
votes
0 answers

Automatic port number assignment using getaddrinfo()

*(Socket programming)*C-code for client (passing messages through UDP) is given below. We can automatically assign port number to socket by not calling bind() before sendto() (related post) binding with port 0 (only provided in windows and solaris…
onk101
  • 21
  • 4
2
votes
1 answer

can't receive UDP broadcast in windows 10 UWP from android app

I'm writing UWP and Android apps using Xamarin.forms & .net Standard 2 for shared code. I'm trying to send and receive UPD boradcast from both apps, but the problem is that I can send and receive as expected from the android app only, and the UWP…
Shadi Fayed
  • 376
  • 4
  • 16
2
votes
1 answer

Can udpclient be both multicast and unicast

I am trying to build a client server socket library that will abstract the complexities of sending and receiving data. I was wondering if you have a UDP server setup to have a multicast group. Can it still send and receive unicast requests to…
Swazimodo
  • 1,147
  • 1
  • 15
  • 34
2
votes
2 answers

Bad File Descriptor - Simple UDP Client

When attempting to create a simple UDP client, my code successfully opens the socket and reads in a small buffer from a file to be sent to a server specified by host address and port number by command line arguments. However, the sendto and recvfrom…
Brendan
  • 21
  • 1
  • 2