NetCoreServer icon indicating copy to clipboard operation
NetCoreServer copied to clipboard

Disallow HTTP or detect if packets are HTTP

Open Enovale opened this issue 3 years ago • 1 comments

This is possible using various methods like checking if the packet starts with GET, POST, etc but I would like a native elegant solution for this because my TcpServer does not support HTTP traffic.

Enovale avatar Oct 12 '20 00:10 Enovale

HTTP is a protocol based on TCP connections. Nothing more than predefined packets according to the specification.

You must (unless you are looking for the byte signature) parse the bytes and discard them if they match the HTTP specification. Theres no way around this.

sojournercntl avatar Oct 13 '20 22:10 sojournercntl