Search code examples
c#httpwebrequestwebclientpacket

Send specific packets with HttpWebRequest


Hey. Is it possible to send a packet from a C# application without using sockets? I'd like to use WebClient or HttpWebRequest in order to send specifically formatted packets to a server. Examples I've seen tend to use UDP client. Thanks


Solution

  • It depends on what you mean by "Specifically Formatted". HttpWebRequest is a .Net wrapper around the HTTP protocol which is not UDP in nature, so you can not customize the packets it sends other than modifying object data like headers, etc.