Represents a TCP socket.
Instances For
Creates a new TCP socket.
Connects a TCP socket to the specified address.
Sends data through a TCP socket.
Receives data from a TCP socket with a maximum size of size bytes. The promise resolves when data is available or an error occurs. If data is received, it’s wrapped in .some. If EOF is reached, the result is .none, indicating no more data is available. Receiving data in parallel on the same socket is not supported. Instead, we recommend binding multiple sockets to the same address.
Binds a TCP socket to a specific address.
Accepts an incoming connection on a listening TCP socket.
Shuts down an incoming connection on a listening TCP socket.
Gets the remote address of a connected TCP socket.
Gets the local address of a bound TCP socket.
Enables the Nagle algorithm for a TCP socket.