PonyTCP¶
Constructors¶
create¶
Returns¶
- PonyTCP val^
Public Functions¶
listen¶
fun box listen(
the_actor: AsioEventNotify tag,
host: String val,
port: String val,
ip_version: IPVersion = reference)
: AsioEventID
Parameters¶
- the_actor: AsioEventNotify tag
- host: String val
- port: String val
- ip_version: IPVersion = reference
Returns¶
accept¶
Parameters¶
- event: AsioEventID
Returns¶
- I32 val
close¶
Parameters¶
- fd: U32 val
Returns¶
- None val
connect¶
fun box connect(
the_actor: AsioEventNotify tag,
host: String val,
port: String val,
from: String val,
asio_flags: U32 val,
ip_version: IPVersion = reference)
: U32 val
Parameters¶
- the_actor: AsioEventNotify tag
- host: String val
- port: String val
- from: String val
- asio_flags: U32 val
- ip_version: IPVersion = reference
Returns¶
- U32 val
keepalive¶
Parameters¶
Returns¶
- None val
peername¶
Parameters¶
- fd: U32 val
- ip: NetAddress ref
Returns¶
- Bool val
receive¶
Parameters¶
- event: AsioEventID
- buffer: Pointer[U8 val] tag
- offset: USize val
Returns¶
- USize val ?
send¶
Parameters¶
- event: AsioEventID
- buffer: ByteSeq
- from_offset: USize val = 0
Returns¶
- USize val ?
shutdown¶
Parameters¶
- fd: U32 val
Returns¶
- None val
sockname¶
Parameters¶
- fd: U32 val
- ip: NetAddress ref
Returns¶
- Bool val
writev¶
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: AsioEventID,
data: Array[ByteSeq] box,
from: USize val,
count: USize val,
first_buffer_byte_offset: USize val = 0)
: USize val ?
Parameters¶
- event: AsioEventID
- data: Array[ByteSeq] box
- from: USize val
- count: USize val
- first_buffer_byte_offset: USize val = 0
Returns¶
- USize val ?
writev_max¶
Maximum number of IOV entries per writev call. IOV_MAX on POSIX, 1 on Windows (Windows submits all entries at once, not in batches).
Returns¶
- I32 val
eq¶
Parameters¶
- that: PonyTCP val
Returns¶
- Bool val
ne¶
Parameters¶
- that: PonyTCP val
Returns¶
- Bool val