class TCPSocket < IO
A TCP connection: Socket.tcp(host, port) makes one.
<std:socket>:4
Class methods
def self.new(host: String, port: Int) -> TCPSocket
Socket.tcp(host, port).
<std:socket>:6
def self.open[R](host: String, port: Int, &: (TCPSocket) -> R) -> R
The same, with the connection given to the block and closed after it; the block's result is returned.
<std:socket>:9
def self.connect(address: Socket::Address) -> TCPSocket
A connection to one address, with no lookup.
<std:socket>:11
Methods
def local_address -> Socket::Address
The address and port of this end of the connection.
<std:socket>:13
def remote_address -> Socket::Address
The address and port of the peer.
<std:socket>:15