Class: TCPServer

Inherits:
Object show all
Defined in:
lib/utilrb/socket/tcp_server.rb

Instance Method Summary collapse

Instance Method Details

#bound_addrObject


4
# File 'lib/utilrb/socket/tcp_server.rb', line 4

def bound_addr; Socket.unpack_sockaddr_in(getsockname)[1] end

#portObject


5
# File 'lib/utilrb/socket/tcp_server.rb', line 5

def port; Socket.unpack_sockaddr_in(getsockname)[0] end