tcpea/client

Functions

pub fn connect(options: TcpeaOptions) -> Result(Socket, Error)

Create a socket connection using the options.

pub fn ip_version(
  options: TcpeaOptions,
  ip_version: IpVersion,
) -> TcpeaOptions

Specify the IP version to use for the conenction.

pub fn new(host: String, port: Int) -> TcpeaOptions

Create a new set of connection options.

pub fn receive(
  socket: Socket,
  milliseconds timeout: Int,
) -> Result(BitArray, Error)

Receive a packet from the socket.

pub fn send(
  socket: Socket,
  packet: BitArray,
) -> Result(Nil, Error)

Send a packet through the socket.

pub fn shutdown(socket: Socket) -> Result(Nil, Error)
pub fn timeout(
  options: TcpeaOptions,
  milliseconds timeout: Int,
) -> TcpeaOptions

Specify a timeout for the connection to be established.

Search Document