Questions tagged [udpclient]

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

575 questions
2
votes
2 answers

C# .NET UDP Sockets Async for Multiple Clients

I have been looking around and I can't really find what I need, especially for UDP. I'm trying to make a basic syslog server listening on port 514 (UDP). I have been following Microsoft's guide on MSDN:…
TobusBoulton
  • 181
  • 1
  • 14
2
votes
1 answer

UDP receiving - precise time when packages arrive in C#

Is there way to know precise time when packages arrives to buffer with UDP protocol in C# (windows 7)? I tried somethings like this: while(true) { UDPclient.Receive(ref remoteEp); Console.WriteLine(System.DateTime.Now.TimeOfDay.ToString());…
Shiro
  • 33
  • 5
2
votes
1 answer

How to receive UDP packages when using UdpClient class in C#

I am trying to write a graphical C# program that can communicate with my Node.js server. I am using UdpClient class and I am able to send some messages to the server. However, I don't know how to receive UDP packages from the server. JavaScript and…
user3654736
  • 55
  • 1
  • 5
2
votes
0 answers

UdpClient.Receive(ref IpEndpoint) receiving its own sent packets from UdpClient.Send(Data, Data.Length, newIpEndpoint)

I'm having trouble in receiving the packets from UdpClient Socket. Problem: My socket is receiving the packets sent as broadcast type however it also receives the packets that it sends itself. How to stop this? I have enabled the Broadcast for…
ankur
  • 85
  • 1
  • 2
  • 12
2
votes
1 answer

UDP client does not receive data without bind()

I refereed to the UDP client program from binarytides and I was able to send a UDP packet frompy PC to the UDP server which is My embedded device and this device echoes back a UDP message. In this PC-UDP client code it is expected to get the echoed…
Sorcrer
  • 1,634
  • 1
  • 14
  • 27
2
votes
1 answer

Strategy for 2 way communication with UDPClients

Hi I'm wondering how to set up UDPClients to enable real-time 2 way communication between clients I'm working on a simple network game in C#, it should be possible for a player to host a game and for others to connect to it The host will send out…
user25470
  • 585
  • 4
  • 17
2
votes
1 answer

UdpClient receiving and sending at the same time

I am maintaining other's code and its using the class UdpClient. The code declares one instance of UdpClient and receives data continuously using the UdpClient.Receive(). When data is received, it is processed in another thread and the UdpClient…
Ignacio Soler Garcia
  • 21,122
  • 31
  • 128
  • 207
2
votes
2 answers

How to detect when data is received by udpclient?

I'm currently working on a small program for home use (mainly because I'm too lazy to run down the stairs every time I want to tell my dad something). Now as for my question: How can I get this code to call my ReceiveText method as soon as the…
Yorrick
  • 377
  • 2
  • 8
  • 28
2
votes
1 answer

Can clients using http 1.0 or older use UDP sockets instead of TCP sockets?

Can clients using http 1.0 or older use UDP sockets instead of TCP sockets? I was wondering as to what could prevent such use apart from firewall issues and packet size limitations. However, if that isn't a problem, is there anything else that…
dhruvbird
  • 6,061
  • 6
  • 34
  • 39
2
votes
1 answer

C#. UDP unicast

I try to receive six messages from UDP unicast clients. Receiver looks like: UdpClient udpclient = new UdpClient(); IPEndPoint localEp = new IPEndPoint(IPAddress.Parse(ClientIP),…
user3649515
  • 199
  • 7
  • 17
2
votes
1 answer

How to do UDP without port forwarding

I am creating an application in C#, It should send data with UDP. Everything works fine until, I try to communicate with a PC that is on the internet behind a router. How do I fix this so that I can use UDP without port forwarding?
igor
  • 21
  • 1
  • 2
2
votes
1 answer

How to create a simple Server Client Application Using RUDP in Java?

I was working on a simple application to transfer files between two machines using UDP, but that turned out to be lossy and unreliable, so while searching the Internet I found this project named Simple Reliable UDP here, but they don't have any…
DeepSidhu1313
  • 805
  • 15
  • 31
2
votes
3 answers

UDPClient Receive method not working in a service

I've been experimenting the UDP sending and receiving in C# and have a strange issue. The code works fine in a console app, but the client.Receive method is blocked when I try to use the exact same code in a Service. The Service runs normally and…
Nate
  • 101
  • 1
  • 5
2
votes
1 answer

C# UdpClient.Receive() not working with multicast no matter what I do

tried to solve this alone for the past I don't even know but no googling will help me here, I would need some advice with this one. I am receiving UDP packets from another PC on my local network every 10 seconds, can see them in wireshark but the…
TomPoczos
  • 95
  • 1
  • 9
2
votes
0 answers

Receive UDP broadcast packets on localhost when network is down

I am using python to create a UDP client to broadcast messages as per code below. this works as expected. however when the network is down, I would still like the server running on the localhost to receive the UDP packets. any way this can be…
Ossama
  • 2,401
  • 7
  • 46
  • 83