module CryBase::Connectivity::TCPSocket

Defined in:

crybase/connectivity/tcp_socket.cr

Class Method Summary

Class Method Detail

def self.open(host_port : String, config : SocketConfig = SocketConfig.new) : ::TCPSocket #

Opens a plaintext TCP socket from a host:port string.

The value must look like 127.0.0.1:12345.

socket = CryBase::Connectivity::TCPSocket.open("127.0.0.1:12345")
socket.close

[View source]
def self.open(host : String, port : Int32, config : SocketConfig = SocketConfig.new) : ::TCPSocket #

[View source]