Skip to content

PonyTCP

[Source]

primitive val PonyTCP

Constructors

create

[Source]

new val create()
: PonyTCP val^

Returns


Public Functions

listen

[Source]

fun box listen(
  the_actor: AsioEventNotify tag,
  host: String val,
  port: String val,
  ip_version: (IP4 val | IP6 val | DualStack val) = reference)
: Pointer[AsioEvent val] tag

Parameters

Returns


accept

[Source]

fun box accept(
  event: Pointer[AsioEvent val] tag)
: I32 val

Parameters

Returns


close

[Source]

fun box close(
  fd: U32 val)
: None val

Parameters

Returns


connect

[Source]

fun box connect(
  the_actor: AsioEventNotify tag,
  host: String val,
  port: String val,
  from: String val,
  asio_flags: U32 val,
  ip_version: (IP4 val | IP6 val | DualStack val) = reference)
: U32 val

Parameters

Returns


keepalive

[Source]

fun box keepalive(
  fd: U32 val,
  secs: U32 val)
: None val

Parameters

Returns


peername

[Source]

fun box peername(
  fd: U32 val,
  ip: NetAddress tag)
: Bool val

Parameters

Returns


receive

[Source]

fun box receive(
  event: Pointer[AsioEvent val] tag,
  buffer: Pointer[U8 val] tag,
  offset: USize val)
: USize val ?

Parameters

Returns


send

[Source]

fun box send(
  event: Pointer[AsioEvent val] tag,
  buffer: (String val | Array[U8 val] val),
  from_offset: USize val = 0)
: USize val ?

Parameters

Returns


shutdown

[Source]

fun box shutdown(
  fd: U32 val)
: None val

Parameters

Returns


sockname

[Source]

fun box sockname(
  fd: U32 val,
  ip: NetAddress tag)
: Bool val

Parameters

Returns


writev

[Source]

Send count buffers from data starting at index from via writev. Builds the platform-specific IOV array (iovec on POSIX, WSABUF on Windows) internally.

first_buffer_byte_offset skips bytes in data(from) for partial write resume.

Returns bytes sent (POSIX) or buffer count submitted (Windows).

fun box writev(
  event: Pointer[AsioEvent val] tag,
  data: Array[(String val | Array[U8 val] val)] box,
  from: USize val,
  count: USize val,
  first_buffer_byte_offset: USize val = 0)
: USize val ?

Parameters

Returns


writev_max

[Source]

Maximum number of IOV entries per writev call. IOV_MAX on POSIX, 1 on Windows (Windows submits all entries at once, not in batches).

fun box writev_max()
: I32 val

Returns


eq

[Source]

fun box eq(
  that: PonyTCP val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: PonyTCP val)
: Bool val

Parameters

Returns