Questions tagged [udpclient]

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

575 questions
3
votes
2 answers

UdpClient.ReceiveAsync correct early termination

Good day. I work with UdpClient and have wrapper upon it. For reading I have asynchronous method: private async Task Receive(UdpClient client, CancellationToken breakToken) { // Выход из async, если произошёл CancellationRequest …
EgoPingvina
  • 734
  • 1
  • 10
  • 33
3
votes
1 answer

how can I parse a UDP packet in .NET?

how can I parse a UDP packet in .NET? I'm using PCap.Net to capture packets, in this case UDP packets, which I can access from the PCap.net object via (PcapDotNet.packets.Ethernet.IpV4.Udp). How can I take the results, the Udp packet, and parse…
Greg
  • 34,042
  • 79
  • 253
  • 454
3
votes
1 answer

Receive streaming of UDP packets sent at fixed, clocked rate

I have the requirement of receiving a stream of UDP packets at a fixed rate of 1000 packets per second. They are composed of 28 bytes of payload, where the first four bytes (Uint32) are the packet sequence number. The sender is an embedded device on…
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
3
votes
3 answers

How to receive UDP packets from any ip and any port?

I wanted to use C#'s UdpClient to listen to any incomming UDP packets. I want to receive packets from any IP and any port. I tried the following: UdpClient udpClient = new UdpClient(0); IPEndPoint ep = new IPEndPoint(IPAddress.Any, 0); byte[] data =…
raisyn
  • 4,514
  • 9
  • 36
  • 55
3
votes
2 answers

UdpClient on local machine

I'm new to C# UDP coding and I have some 'strange' behaviour when using an UDP client locally on my pc. I want to send UDP data from one port (11000) on my pc to another port (12000) on the same pc. This is a snippet from my code : public class…
Filip
  • 31
  • 1
  • 2
3
votes
2 answers

python graypy simply not sending

import logging import graypy my_logger = logging.getLogger('test_logger') my_logger.setLevel(logging.DEBUG) handler = graypy.GELFHandler('my_graylog_server', 12201) my_logger.addHandler(handler) my_adapter =…
Ohad Perry
  • 1,315
  • 2
  • 15
  • 26
3
votes
2 answers

websockets protocols?

I couldn't find this online so I thought I'd ask here. What protocols can be used by websockets currently? (in chrome) Also does chrome or any other browser plan to support RUDP protocol for websockets eventually? Thanks in advance!
resopollution
  • 19,600
  • 10
  • 40
  • 49
3
votes
0 answers

How to get UPD packet when application is in background

I am new in iOS and now i got stuck so i thought i should post some thing over her may be some one help me out i am developing iOS app and my app is able to send udp packet over local network every thing is working fine application can send and…
3
votes
1 answer

UdpClient can't receive after connect

I'm using this code to listening on port 9999 udp. Dim remoteSender As New IPEndPoint(IPAddress.Any, 0) client = New UdpClient(9999) Dim state As New UdpState(client, remoteSender) client.BeginReceive(New AsyncCallback(AddressOf…
LeDuc
  • 245
  • 2
  • 9
3
votes
2 answers

Port selection for local IPEndPoint creation. Does port number matter?

This is the first time I'm working with IPEndPoint, so pardon my lack of experience. If I create an IPEndPoint like this: IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Parse("192.168.1.25"), 0); Is it possible that port 0 will already be…
blitz_jones
  • 1,048
  • 2
  • 10
  • 22
3
votes
1 answer

ASP.NET UDP socket code works in development, but not in production on IIS

I have the following UDP broadcast listener running as a static component in a seperate thread on an ASP.NET web application. Why I would do this is really, unimportant, but the reason why this wont work when deployed baffles me. I do have several…
Ash
  • 24,276
  • 34
  • 107
  • 152
3
votes
3 answers

sending and receiving UDP packet on datagram socket in android

I have two classes,one sender class and the other is the receiver class.Both of the sending and receiving apps stops after few seconds and close down. My sender class is : public class MainActivity extends Activity { InetAddress…
Ameer Humza
  • 83
  • 1
  • 3
  • 13
3
votes
1 answer

i have two android apps ,one can send the string over LAN at specific IP and other app for receiving but i want to broadcast the string over LAN?

I want to broadcast the string over LAN, but when I change the server IP in client code to 255.255.255.255 it doesn't broadcast. What shall I do in order to broadcast the string over LAN? What shall I do in client code so that all the listening…
Talib
  • 1,134
  • 5
  • 31
  • 58
3
votes
1 answer

SocketException An existing connection was forcibly closed by the remote host

I've decided to take a look at network messaging etc and my first port of call was UDP. The problem i have is when i attempt to send a message. I'm trying to hit an IP on a specifc port, but the application errors with the error "SocketException An…
user2607250
  • 31
  • 1
  • 3
3
votes
3 answers

UDP local broadcast

I'm working on a remote control tool. The client runs a program to locally send commands to servers in order to control them. However, the client doesn't know the server's IP address and vice versa. I decided to use UDP broadcasting (please tell me…
Abandoned account
  • 1,855
  • 2
  • 16
  • 22