Ok im pretty new in this networking stuff in .net especially in sockets.
I’ve already “made” a proxy application and tried using it with my own local website (using wampserver) i selected few pictures that are around 60~k bytes of size yet i receive in my proxy counter around 15k “bytes”, I have the feeling this is the packets cause i’m using
Socket.Send & Socket.Receive. Any help would do 🙂
Ok im pretty new in this networking stuff in .net especially in sockets. I’ve
Share
Your problem is one of message framing. The
Availableproperty only reports the bytes that have arrived so far – not the complete HTTP request or response.If this is just a learning exercise, then I recommend using another protocol. HTTP has one of the most complex message framing systems of any protocol.
If this is intended for production, then you’ll have to implement (at least partial) HTTP parsing to handle the message framing, and I also recommend a change to asynchronous socket methods rather than synchronous. A better solution is to just implement a web application that uses
WebRequestto handle client requests.