Method: Packet::Core::CommonMethods#remove_connection
- Defined in:
- lib/packet/packet_core.rb
#remove_connection(t_sock) ⇒ Object
method removes the connection and closes the socket
99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/packet/packet_core.rb', line 99 def remove_connection(t_sock) read_ios.delete(t_sock) write_ios.delete(t_sock) begin unless t_sock.closed? connections.delete(t_sock.fileno) t_sock.close end rescue puts "#{$!.message}" end end |