Class: TCPSocket

Inherits:
Socket show all
Defined in:
lib/neverblock/io/socket.rb

Constant Summary

Constants inherited from IO

IO::NB_BUFFER_LENGTH

Instance Method Summary collapse

Methods inherited from Socket

#connect, #connect_blocking, #connect_neverblock

Methods inherited from BasicSocket

getaddress, #recv, #recv_blocking, #recv_neverblock

Methods inherited from IO

#getc, #gets, #print, #rb_getc, #rb_gets, #rb_print, #rb_read, #rb_readchar, #rb_readline, #rb_readlines, #rb_sysread, #rb_syswrite, #rb_write, #read, #read_neverblock, #readchar, #readline, #readlines, #readpartial, #sysread, #syswrite, #write, #write_neverblock

Constructor Details

#initialize(*args) ⇒ TCPSocket

Returns a new instance of TCPSocket.



70
71
72
73
# File 'lib/neverblock/io/socket.rb', line 70

def initialize(*args)
  super(AF_INET, SOCK_STREAM, 0)
  self.connect(Socket.sockaddr_in(*(args.reverse)))
end