Module sys/unix
sys/unix
Unix domain socket operations.
Provides Unix domain socket wrappers around the low-level C runtime externs.
Reuses the socket ops (bind/listen/accept/connect/send/recv/close) from the
generic socket externs. Uses sockaddr_un helpers to build address buffers.
Types
Functions
socket_stream
function
fn() -> IOFuture
Returns: IOFuture
socket_dgram
function
fn() -> IOFuture
Returns: IOFuture
bind
function
fn(sockfd : i32, addr : *(u8), addrlen : u32) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
addr | *(u8) | |
addrlen | u32 |
Returns: IOFuture
listen
function
fn(sockfd : i32, backlog : i32) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
backlog | i32 |
Returns: IOFuture
accept
function
fn(sockfd : i32, addr : *(u8), addrlen : *(u32)) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
addr | *(u8) | |
addrlen | *(u32) |
Returns: IOFuture
connect
function
fn(sockfd : i32, addr : *(u8), addrlen : u32) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
addr | *(u8) | |
addrlen | u32 |
Returns: IOFuture
send
function
fn(sockfd : i32, buf : *(u8), len : usize, flags : i32) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
buf | *(u8) | |
len | usize | |
flags | i32 |
Returns: IOFuture
recv
function
fn(sockfd : i32, buf : *(u8), len : usize, flags : i32) -> IOFuture
Parameters
| Name | Type | Notes |
|---|---|---|
sockfd | i32 | |
buf | *(u8) | |
len | usize | |
flags | i32 |
Returns: IOFuture
make_sockaddr_un
function
get_path
function
fn(addr_buf : *(u8)) -> *(u8)
Parameters
| Name | Type | Notes |
|---|---|---|
addr_buf | *(u8) |
Returns: *(u8)