Skip to content

std/sys

This package may not be fully viewable as it is documented using juledoc. Due to its low-level nature, it contains many specific definitions. For more detailed documentation, refer to the source code.

Index

fn GetLastErrno(): Errno
fn NewTimeval(sec: i64, usec: i64, mut &out: Timeval): bool
fn Seek(handle: int, offset: i64, origin: int): i64
unsafe fn Read(handle: int, mut buff: *unsafe, n: uint): int
fn Close(handle: int): int
unsafe fn Write(handle: int, buff: *unsafe, n: uint): int
fn Exit(code: int)
fn Htons(x: int): u16
fn Ntohs(x: int): u16
unsafe fn Select(nfds: int, mut read: *Fd, mut write: *Fd, mut err: *Fd, mut timeout: *Timeval): int
type Errno
type Timeval
type Sockaddr
type SockaddrIn
type SockaddrIn6
type Fd

GetLastErrno

jule
fn GetLastErrno(): Errno

Returns number of last error.

NewTimeval

jule
fn NewTimeval(sec: i64, usec: i64, mut &out: Timeval): bool

Creates new Timeval by sec and usec. Sets fields of the out. Reports whether sec and usec have valid range. If sec or usec have invalid range, out will not be mutated.

Seek

jule
fn Seek(handle: int, offset: i64, origin: int): i64

Wrapper for C's lseek function.

Read

jule
unsafe fn Read(handle: int, mut buff: *unsafe, n: uint): int

Wrapper for C's read function.

Close

jule
fn Close(handle: int): int

Wrapper for C's close function.

Write

jule
unsafe fn Write(handle: int, buff: *unsafe, n: uint): int

Wrapper for C's write function.

Exit

jule
fn Exit(code: int)

Wrapper for C's exit.

Htons

jule
fn Htons(x: int): u16

C's htons macro.

Ntohs

jule
fn Ntohs(x: int): u16

C's ntohs macro.

Select

jule
unsafe fn Select(nfds: int, mut read: *Fd, mut write: *Fd, mut err: *Fd, mut timeout: *Timeval): int

C's select function.

Errno

jule
type Errno: int

Type of error numbers.

Timeval

jule
type Timeval: cpp.timeval

C's timeval structure.

Sockaddr

jule
type Sockaddr: cpp.sockaddr

C's sockaddr structure.

SockaddrIn

jule
type SockaddrIn: cpp.sockaddr_in

C's sockaddr_in structure.

SockaddrIn6

jule
type SockaddrIn6: cpp.sockaddr_in6

C's sockaddr_in6 structure.

Fd

jule
type Fd: cpp.fd_set

C's fd_set structure.