How to sustain TcpListener keep-alive?
I'm creating a https SSL listener that works on top of the tcplistener, but I'm having a problem with the TCP keep-alive.
The itself server works well, but it seems that every request cannot reuse previous connections.
The code below was trimmed to reduce the size of the example. Btw, I open the streams and discard them at the end of TCPListeners egiBeginAcceptTcpClient callback . I couldn't find another example or documentation about it, so idk if I should reuse networkstreams or just accept another tcpclient.
my question is: how i'm supposed to manage the tcplistener clients/streams in order to mantain keep-alive connections?
2 Replies
is the client keep-alive aware?
how does proxyClient work with listener?
if you are using raw tcp to implement http then you have to implement keep-alive by yourself, tcp won't do that for you
i just had to put the http session in an while loop
i figured out the next http requests was returning to the same network stream