The requirement is to transfer bytes data stream(in bytes format) through HTTP or FTP protocol. I am doing it with IP protocol but as it is unable to be handled by load balancers. Right now I am sending data stream by converting into byte format and at receiver’s end decoding it into string form. The same thing I wanna do with HTTP protocol.
Socket sock = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.IP);
Here in ProtocolType.IP there should be HTTP but HTTP option is not there.
This is a WinForms application.
HTTP isn’t a protocol at that level – it’s an application level protocol.
You don’t get “an HTTP socket” – you typically get a TCP/IP socket and write HTTP data over that.
See the OSI model for more details about the network layers involved.
I don’t know for sure whether the built-in HTTP client libraries in .NET support streaming requests… you’d probably want to turn buffering off and write to the request stream. See what that looks like at the socket level using something like WireShark.