In any socket API the close() method closes a connection with a FIN. If I want to abort a connection with a RST how can I do it?
From stackoverflow
akshat
-
I am not sure about Ruby EventMachine, but if what that framework gives you is a normal Ruby TCPSocket, then you should be able to turn on SO_LINGER by doing something like this:
linger = [1,0].pack('ii') sock.setsockopt(Socket::SO_SOCKET, Socket::SO_LINGER, linger) sock.closeFrom Aaron Hinni
0 comments:
Post a Comment