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

Java client mixed TCP-and-UDP functionality

I'm writing a client-server application in Java in a way that a client and a server could interact with each through a UDP socket, ping-pong through a TCP socket, and users (clients) could chat with each other through TCP sockets. I have two…
Andrei
  • 135
  • 5
  • 18
2
votes
0 answers

Why is my UDPClient deaf to incoming UDP packets over the wifi interface?

I have a UDPClient listener running on a Windows 7 machine. If I bind to the local IP of the wired ethernet adapter as follows I'm able to receive UDP data without any problems: IPAddress^ localIP = IPAddress::Parse("10.10.7.76"); IPEndPoint^ ep =…
Jon Cage
  • 36,366
  • 38
  • 137
  • 215
2
votes
1 answer

Should UdpClient be a singleton when using it for logging?

I'm using Graphite.NET for logging to statsD. Underneath the hood, it uses UdpClient to write to the statD server. Source. I think makes sense to create this as a singleton because I will be logging frequently and it seems that there will be a lot…
jpatapoff
  • 335
  • 2
  • 9
2
votes
3 answers

UdpClient Exception on async reception only on Windows XP

I've a c# code that works very well in Windows vista/seven, but not on Windows XP. The problematic part is a "multicast" node, that basically read and send data over a multicast address+port. The part that is reading/writing to the network is a…
J4N
  • 19,480
  • 39
  • 187
  • 340
2
votes
2 answers

Get the IpAddress on which we received an UDP Multicast request

I'm using an UdpClient to read data from a multicast group. It's configured like this: m_udpClientReceiver = new UdpClient(); m_receivingEndPoint = new IPEndPoint(IPAddress.Any, m_port); m_udpClientReceiver.ExclusiveAddressUse =…
J4N
  • 19,480
  • 39
  • 187
  • 340
2
votes
1 answer

Processing incoming messages from UdpClient.BeginReceive()

Okay, this is my first stack overflow question so please feel free to suggest better ways to ask or what I should include next time. Most of the time I can Google to get my answers but this one is a little trickier... I am writing a windows…
Dinsdale
  • 617
  • 1
  • 7
  • 8
2
votes
2 answers

How to release unmanaged resources in a WCF service that is hosted in a Windows Service?

I have a WCF service hosted in a Windows Service. The WCF service has a thread that makes a UdpClient connection to an outside system. I am finding that when the Windows Service is stopped that the thread is not always gracefully shutting down and…
Corey Burnett
  • 7,312
  • 10
  • 56
  • 93
2
votes
1 answer

Encoding.ASCII.GetString returning blank value (Only in windows Application)

I'm trying to create a windows application with Visual Studio 2012 but weird stuff seems to be happening... When I run the exact same code in a console app, it works fine but it seems that I can't output the following once I run it in a thread on a…
Raffikki
  • 23
  • 5
2
votes
1 answer

C# Unable to receive WOL package with UdpClient

I'm trying to receive a WOL package within my C# application. I guess the problem why it doesn't work has something to do with how the package is broadcasted by my router running DD-WRT. The code I use to receive an UDP package: UdpClient udp =…
Maik
  • 228
  • 2
  • 8
2
votes
1 answer

TCP hole puching - How to proceed this step

I finished a P2P program in Java that is working perfectly in LAN range, and now I'm stuck at the well-known NAT traversal problem. I want to allow my users to connect to each other passing through the NAT boundaries (I know that is impossible to…
2
votes
1 answer

UDP Boost ASIO async client hangs

I'm trying to make a toy asynchronous echo client using the boost asio. For some reason it gets blocked on the second request/reply cycle while waiting for sent_=true, but before receiving the echo (w/o the server crashing). /* UDP asynchronous…
marcmagransdeabril
  • 1,445
  • 16
  • 27
2
votes
5 answers

How to detect that UDP packet has been lost? (C#)

I am developing SNTP client which gets time stamp from NTP server via UDP. Everything works fine, I can download time stamp and update windows clock, but I'd like to get a message if UDP packet has been lost. How can I detect when packet has been…
user1528100
  • 49
  • 2
  • 5
2
votes
2 answers

How to reduce message dropping in UDP socket communication, using only single port?

I have writter code snippet for UDP Client and server. I am using same port for sending and receiving. My problem is that there are many messages drops at client side, so can someone help me to optimize my code, here is my code for UDP…
Yuvi
  • 1,344
  • 4
  • 24
  • 46
2
votes
1 answer

Delphi Indy IdUdpClient read operation, No data returned

I need to read the information that is sent by an electronic device (using UDP protocol). I am having problems using Indy components (version 9) in Delphi 7. Below you can see my code. procedure TForm1.Button1Click(Sender: TObject); var buffer:…
user1361263
  • 101
  • 2
  • 5
  • 11
2
votes
1 answer

UDP datagram code for server client application in C#

When i try to send a message from my client , the server is not able to receive that message and print it. Can anyone tell me the error in the following server client application. I have created two WinForm projects, one is UDP server and the other…
idrisjafer
  • 725
  • 1
  • 14
  • 29