Represents a TCP server socket, managing incoming client connections.
- ofNative :: (
- native : UV.TCP.Socket
- )
Instances For
Represents a TCP client socket, used to connect to a server.
- ofNative :: (
- native : UV.TCP.Socket
- )
Instances For
Creates a new TCP server socket.
Equations
- Std.Internal.IO.Async.TCP.Socket.Server.mk = do let native ← Std.Internal.UV.TCP.Socket.new pure { native := native }
Instances For
Binds the server socket to the specified address. Address reuse is enabled to allow rebinding the same address.
Instances For
Gets the local address of the server socket.
Equations
Instances For
Enables TCP keep-alive for all client sockets accepted by this server socket.
Instances For
Creates a new TCP client socket.
Equations
- Std.Internal.IO.Async.TCP.Socket.Client.mk = do let native ← Std.Internal.UV.TCP.Socket.new pure { native := native }
Instances For
Binds the server socket to the specified address. Address reuse is enabled to allow rebinding the same address.
Instances For
Connects the client socket to the given address.
Instances For
Receives data from the client socket. 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.
Instances For
Gets the remote address of the client socket.
Equations
Instances For
Gets the local address of the client socket.
Equations
Instances For
Enables TCP keep-alive with a specified delay for the client socket.