UdpClient (System.Net.Sockets.UdpClient) is a .NET-Class allowing to send and receive UDP-Traffic.
Questions tagged [udpclient]
575 questions
0
votes
1 answer
c# udp client receivebtye unreadable
I've created a client which sends the get server list command, but the received bytes isn't readable.
Here is my code :
byte[] receiveBytes = udp.Receive(ref RemoteIpEndPoint);
string[] returnData =…

madman
- 319
- 2
- 6
- 19
0
votes
1 answer
Does a "UDP Client For the TIME Service" need to check the length of the read data before converting?
I'm in the middle of of reading Internetworking with TCP/IP Vol III, by Comer.
I am looking at a some sample code for a "TIME" client for UDP.
The code gets to the point where it does the read of the response, and it takes what should be a 4 bytes…

benc
- 1,381
- 5
- 31
- 39
0
votes
1 answer
receive all udp packets on multicast
i am using the c# UdpClient (client in code) to receive data on a multicast group.
In a while loop the follwing happens:
while(receiving)
//First i check if data is available, polltime = 100ms
if(client.Client.Poll(polltime,…

Gobliins
- 3,848
- 16
- 67
- 122
0
votes
0 answers
How does C# UdpClient.Receive work when broadcaster reboots?
I'm writing an application that needs to receive multicast data from a piece of hardware. I have it working fine. Occasionally, outside of the control of my application, the hardware that is broadcasting will reboot. It is my understanding from…

Corey Burnett
- 7,312
- 10
- 56
- 93
0
votes
1 answer
When transmitting data using UDP is it necessary to include the message length as part of the message?
I have a client who is looking to reduce the number of bytes transmitted over the wire to the absolute minimum. When creating a udpClient class and invoking the receive method, a byte array is returned. Currently I'm using receiveBytes.Length to get…

Brian Leeming
- 11,540
- 8
- 32
- 52
0
votes
1 answer
UdpClient can't receive from DatagramSocket
I am making an application. server side works on desktop and client side works on Windows 8 (Metro App- .Net for Windows Store)
here is my server code:
var udpServer = new UdpClient(7800);
udpServer.BeginRecieve(new AsyncCallback(OnUdpRecieve),…

Peyman
- 3,059
- 1
- 33
- 68
0
votes
3 answers
UDP Connection Between Client and Server
Here is the server code of my program this is working, but after it sends data it gets stuck. I need it to be refreshed and ready for sending data again.
Server code:
private void button1_Click(object sender, EventArgs e) {
try {
…

user1713389
- 13
- 1
- 6
0
votes
0 answers
java Read file via UDP
I have a UDP server reading images, both UDP and TCP.
The protocol format is:
length
ID
payload
When I try to read the payload or image itself, I can do it by using a FLAG, but this is not desirable. How can I stop reading the file in UDP (or know…

gogasca
- 9,283
- 6
- 80
- 125
0
votes
1 answer
Fast Way to reserve Ports in VB.NET
I have a need for my application to reserve certain port numbers. All I need to do is reserve them. I don't have to receive messages or anything. What is the fastest and easiest way to do this. I've tried the…

Ian
- 4,169
- 3
- 37
- 62
0
votes
1 answer
UDP Multicast between PC and Android ICS (CSharp vs. Java)
i've got a little problem that causes me serious headaches.
I wrote two small programs for UDP communication (each of them receives and sends).
Tests so far:
- PC sends packet and receives it.
- Android sends packet and receives it.
After another…

Malte
- 114
- 9
0
votes
1 answer
Call UdpClient.Send() inside System.Timers.Timer event does not work
in my application I receive an UDP stream and I forward it on two other UDP endpoints.
My problem is that I need to put a delay between the two streams, so I thought to use a Timer.
This is my code (where I show only the relevant methods):
public…

Barzo
- 1,039
- 1
- 11
- 37
0
votes
1 answer
UDP DatagramSocket and Multicast IP
I'm having a bit of an issue here with receiving messages on client:
Essentially, I'am able to send a message "Hello world" to the listener, but when the listener tries to send "Reply", the client does not get the message?
What do you think I am…

LB.
- 13,730
- 24
- 67
- 102
0
votes
1 answer
Unable to run multiple applications on one PC
I have 3 WPF applications that were running on 3 separate PCs and are communicating using UDP with each other. When I run all them on one PC they cannot share the Port on which they communicate and so crash. Is there a way in which these…

Aashish Thite
- 490
- 1
- 5
- 17
0
votes
1 answer
confused about why UDP client server is doing this
Im creating a client-server application using UDP. Before anyone asks why I'm using UDP instead of TCP let me tell answer by stating that its for an assignment. Ok on to the question!
I have created a client class that spawns a thread in order to…

Katana24
- 8,706
- 19
- 76
- 118
-1
votes
1 answer
How do I send a struct from a UDP client to server?
I'm having some trouble sending a struct of data from a UDP client to a UDP server. I'm not sure what the problem is exactly. I have a source file responsible for setting up a UDP client and defining the function to send data:
UDPClient.cpp
#include…

ewaddicor
- 29
- 2