0

I trying to send simple byte array ( length size if 1200 - 1500 bytes ) to some specific ip&port

I see that the return value of the send if the number of the bytes that i really sending .. but on the wireshark and on the client i can't see that my buffer was sent.

And there is no exception on the send

the code

UdpClient udpClient = new UdpClient("190.1.2.3", 11000);
Byte[] sendBytes = ... ( some serialized data ) 
try{
      udpClient.Send(sendBytes, sendBytes.Length);
      //     udpClient.Send(sendBytes, sendBytes.Length, "190.1.2.3", 11000);
  }
  catch ( Exception e ){
          Console.WriteLine( e.ToString());
    }
Yanshof
  • 9,659
  • 21
  • 95
  • 195
  • http://stackoverflow.com/questions/2637697/sending-udp-packet-in-c-sharp check the link – katmanco Oct 19 '15 at 10:11
  • 1
    What does _"i can't see that my buffer was sent"_ mean exactly? – CodeCaster Oct 19 '15 at 10:11
  • probably that wireshark does not show the contents of the buffer I would guess – Thomas Oct 19 '15 at 10:18
  • ok, but i will see the ip@port that i sending on - and i cant see it – Yanshof Oct 19 '15 at 11:14
  • I just ran the above code (I changed `byteToSend` to `sendBytes`), and it works fine (confirmed by [this Network Monitor screenshot](http://i.imgur.com/gjsxkNN.png)). So the code works. Maybe you are not using Wireshark correctly, or maybe some firewall is blocking the packet? – Anders Carstensen Oct 19 '15 at 11:24

0 Answers0