Send TCP packet in C#

后端 未结 6 1135
栀梦
栀梦 2020-12-17 06:55

I want to send a TCP packet (with a custom header) in C#. The building of such packets is no problem, and I have the data in a byte array. But how can I send this packet ove

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-17 07:26

    Are you attempting to send a TCP packet or a UDP packet? If you want to send a TCP packet you need to Connect() to your the remote end point before you attempt to send the packet.

提交回复
热议问题