EgretDoc
Back to Home
Location:system/aio.unix.socket

Module

Module documentation.

moduleaio.unix.socket

Classes

Classes and inheritance.

Functions

Free functions and class methods.

functionaio.unix.socket::__aio_unix_connect
Signatureextern func __aio_unix_connect(path: String, timeout_ms: Int) -> Future(Int, ErrCode);
extern func __aio_unix_connect(path: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_unix_listen`.
@briefBinds the low-level runtime symbol `__aio_unix_connect`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • pathFile or directory path.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::__aio_unix_listen
Signatureextern func __aio_unix_listen(path: String, backlog: Int) -> Int;
extern func __aio_unix_listen(path: String, backlog: Int) -> Int;
/*
@brief Binds the low-level runtime symbol `__aio_unix_accept`.
@briefBinds the low-level runtime symbol `__aio_unix_listen`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • pathFile or directory path.
  • backlogMaximum number of pending inbound connections accepted by the listening socket.
@returnReturns the operation result as `Int`.
functionaio.unix.socket::__aio_unix_accept
Signatureextern func __aio_unix_accept(fd: Int, timeout_ms: Int) -> Future(Int, ErrCode);
extern func __aio_unix_accept(fd: Int, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_unix_send`.
@briefBinds the low-level runtime symbol `__aio_unix_accept`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::__aio_unix_send
Signatureextern func __aio_unix_send(fd: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);
extern func __aio_unix_send(fd: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_unix_recv`.
@briefBinds the low-level runtime symbol `__aio_unix_send`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • dataInput or output data buffer.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::__aio_unix_recv
Signatureextern func __aio_unix_recv(fd: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);
extern func __aio_unix_recv(fd: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode);
/*
@brief Binds the low-level runtime symbol `__aio_unix_close`.
@briefBinds the low-level runtime symbol `__aio_unix_recv`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • max_bytesMaximum number of bytes to read or process in this operation.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::__aio_unix_close
Signatureextern func __aio_unix_close(fd: Int) -> Void;
extern func __aio_unix_close(fd: Int) -> Void;

/*
@briefBinds the low-level runtime symbol `__aio_unix_close`.
@detailsThis function is an external entry point used by system modules to access native runtime capabilities such as filesystem, networking, threading, GC, cryptography, or platform operations. Prefer the safe wrapper functions in the same file when available. When calling this entry directly, pass validated arguments that match the signature and handle failures according to the return-value convention.
@param
  • fdOperating-system file descriptor or socket descriptor.
@returnVoid
functionaio.unix.socket::connect
Signaturefunc connect(path: String, timeout_ms: Int) -> Future(Int, ErrCode)
func connect(path: String, timeout_ms: Int) -> Future(Int, ErrCode) {
    return __aio_unix_connect(path, timeout_ms);
}
@briefEstablishes a connection with `connect`.
@detailsExecutes the `connect` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • pathFile or directory path.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::listen
Signaturefunc listen(path: String, backlog: Int = 128) -> Int, ErrCode
func listen(path: String, backlog: Int = 128) -> Int, ErrCode {
    let fd: Int = __aio_unix_listen(path, backlog);
    return fd, aio.error_code_from_int_result(fd);
@briefCreates a listening endpoint with `listen`.
@detailsExecutes the `listen` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • pathFile or directory path.
  • backlogMaximum number of pending inbound connections accepted by the listening socket.
@returnReturns `Int, ErrCode`; on success the error code is `std.OK` or `OK`, and on failure the error code describes the failure while any returned value contains the usable partial result when available.
functionaio.unix.socket::accept
Signaturefunc accept(fd: Int, timeout_ms: Int) -> Future(Int, ErrCode)
func accept(fd: Int, timeout_ms: Int) -> Future(Int, ErrCode) {
    return __aio_unix_accept(fd, timeout_ms);
}
@briefAccepts an incoming connection with `accept`.
@detailsExecutes the `accept` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::send
Signaturefunc send(fd: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode)
func send(fd: Int, data: String, timeout_ms: Int) -> Future(Int, ErrCode) {
    return __aio_unix_send(fd, data, timeout_ms);
}
@briefSends data with `send`.
@detailsExecutes the `send` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • dataInput or output data buffer.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::recv
Signaturefunc recv(fd: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode)
func recv(fd: Int, max_bytes: Int, timeout_ms: Int) -> Future(String, ErrCode) {
    return __aio_unix_recv(fd, max_bytes, timeout_ms);
}
@briefReceives data with `recv`.
@detailsExecutes the `recv` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • fdOperating-system file descriptor or socket descriptor.
  • max_bytesMaximum number of bytes to read or process in this operation.
  • timeout_msTimeout in milliseconds; negative values usually select blocking or default timeout behavior.
@returnVoid
functionaio.unix.socket::close
Signaturefunc close(fd: Int) -> Void
func close(fd: Int) -> Void {
    _ = __aio_unix_close(fd);
    return;
@briefCloses resources and makes later operations unavailable with `close`.
@detailsExecutes the `close` system-library API. The documented parameters define the accepted inputs, ownership requirements, range limits, and timeout behavior for this call. Callers must check returned `ErrCode` values or boolean status values before using the result.
@param
  • fdOperating-system file descriptor or socket descriptor.
@returnVoid

Variables

Class fields (var).