UdpClient (System.Net.Sockets.UdpClient) is a .NET-Class allowing to send and receive UDP-Traffic.
Questions tagged [udpclient]
575 questions
3
votes
2 answers
Visual Basic UDPClient Server/Client model?
So I'm trying to make a very simple system to send messages from a client to a server (and later on from server to client as well, but baby steps first). I'm not sure exactly how to use UDPClient to send and receive messages (especially to receive…

Postman
- 517
- 2
- 8
- 17
3
votes
1 answer
PHP UDP socket_ recv() timeout
I am working on server/client php scripts which can communicate over a UDP socket.
I was wondering if there is a good way to implement a timeout() for the socket_recv() function. Currently it is blocking in my client, waiting for an ack.
Thanks for…

Philipp Werminghausen
- 1,142
- 11
- 29
3
votes
3 answers
Receiving udp packet on designated network card c#
I have 3 different network cards each with their individual responsibility. Two of the cards are receiving packets from a similar device (plugged directly into each individual network card) which sends data on the same port. I need to save the…

jsmith
- 7,198
- 6
- 42
- 59
3
votes
1 answer
How to exchange packets with server in VB.NET?
I'm still completely newbie at vb.net. I apologize for my english.
I want to get a gameserver information from server. Server is using GameSpy protocol. In order to get information, you will have to send a request. Server will answer to it and you…

Alexander
- 169
- 2
- 11
3
votes
3 answers
How to use asynchronous Receive for UdpClient in a loop?
I am building a multi-threaded application. One of the threads is responsible for processing UDP messages that come from an external piece of hardware. I am currently using the UdpClient.Receive method in a loop. I believe that the Receive method…

Corey Burnett
- 7,312
- 10
- 56
- 93
3
votes
1 answer
Thousands of concurrent packets, ThreadPool vs BeginRead?
I'm running an application that has 5000 instances of the UdpClient class since I need to transmit packets concurrently on different ports.
I'm currently using a System.Timers.Timer, which runs on the ThreadPool. It has a very short Interval with…

sharp12345
- 4,420
- 3
- 22
- 38
3
votes
1 answer
DatagramSocket cannot receive data from UdpClient
I am making an Win RT app that connects to a desktop app and they start to communicate in UDP and TCP.
I have successfully implemented TCP communication in that I can send from Win RT to Desktop and send from Desktop to Win RT. using StreamSocket on…

Peyman
- 3,059
- 1
- 33
- 68
3
votes
1 answer
UdpClient.EnableBroadcast value has no effect
I was just playing around with a UdpClient and noticed setting UdpClient.EnableBroadcast to true or false doesn't have any (side)effect, I am able to broadcast with it either way:
using (UdpClient client = new UdpClient())
{
byte[] data =…

Saeb Amini
- 23,054
- 9
- 78
- 76
3
votes
3 answers
On Udp -Level :"Only one usage of each socket address is normally permitted"
My Scenario is:
There are two pieces of software running on two different machines, one as a server and one as a client. They both use same ports for communicating to each other on UDP level. ( due to the client hardware it's not possible to set the…

DForce
- 31
- 1
- 5
3
votes
2 answers
Creating a UdpClient for reading incoming data - VB.net
i have a code
*edited, with the whole code snippet
Dim receivingUdpClient As New UdpClient(20000)
Dim RemoteIpEndPoint As New IPEndPoint(IPAddress.Any, 0)
Try
Console.WriteLine("listening")
Dim receiveBytes As [Byte]() =…

fwoop
- 75
- 1
- 3
- 7
3
votes
3 answers
Could I use UDPClient and UDPServer in Delphi to send a large amount of data?
First of all my intend is to create 2 programs server and client to send big byte array. I just started to test with UDPclient and udpserver components. I am not if it is right way.
I found program example but it was built with an old Delphi…

Samir Memmedov
- 149
- 1
- 2
- 11
2
votes
1 answer
Two-Way Communication Between Applications Using UDP
I've done this already using TCP/IP. I am now trying to do this using UDP. These applications are both being run on the same host. So both the client/server are sending/receiving on the 127.0.0.1:5000. The problem is that they are receiving the…

LunchMarble
- 5,079
- 9
- 64
- 94
2
votes
2 answers
UdpClient Send Receive
First I want to say that I read: UdpClient, Receive() right after Send() does not work?
My question is: is this the normal standard way to handle UDP communications. Set up one UdpClient for send and another for receive?

LunchMarble
- 5,079
- 9
- 64
- 94
2
votes
2 answers
SocketException on wrong thread
I am using the C# UdpClient class to to UDP networking. There is one UdpClient object, bound to a fixed local port, but not to any remote endpoint, because it needs to be able to send/receive to/from multiple different endpoints.
I have two threads:…

Jan Dörrenhaus
- 6,581
- 2
- 34
- 45
2
votes
0 answers
Can't turn off MulticastLoopback on UdpClient
I am sending directed broadcast packets from a UdpClient.
I am also listening on the target port on a second UdpClient (in the same app).
I do not want to see packets created by myself, so I thought it would just be a case of setting…

GazTheDestroyer
- 20,722
- 9
- 70
- 103