Module net.unix stdlib

net.unix
Version:
0.3.3
License:
MIT
Dependencies from vmod:
0
Imports:
3
Imported by:
0
Repository:
OS-specific
Show selected OS-specific symbols.
Backend-specific
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imports

Imported by

This section is empty.

Aliases

This section is empty.

Constants

This section is empty.

Sum types

This section is empty.

Functions

#fn close

fn close(handle int) !

close a socket, given its file descriptor handle.

#fn connect_stream

fn connect_stream(path string) !&StreamConn

#fn listen_stream

fn listen_stream(sock string) !&StreamListener

#fn shutdown

fn shutdown(handle int, config net.ShutdownConfig) int

shutdown shutsdown a socket, given its file descriptor handle.

By default it shuts it down in both directions, both for reading and for writing. You can change that using net.shutdown(handle, how: .read) or net.shutdown(handle, how: .write)

Structs

#struct StreamSocket

pub struct StreamSocket {
pub:
	handle int
mut:
	path string
}

#fn new_stream_socket

fn new_stream_socket() !StreamSocket

#fn (&StreamSocket) close

fn (mut s &StreamSocket) close() !

#fn (&StreamSocket) @select

fn (mut s &StreamSocket) @select(test Select, timeout time.Duration) !bool

#fn (&StreamSocket) connect

fn (mut s &StreamSocket) connect(a string) !

#struct StreamConn

#fn (&StreamConn) close

fn (mut c &StreamConn) close() !

#fn (&StreamConn) write_ptr

fn (mut c &StreamConn) write_ptr(b &u8, len int) !int

write_ptr blocks and attempts to write all data

#fn (&StreamConn) write

fn (mut c &StreamConn) write(bytes []u8) !int

write blocks and attempts to write all data

#fn (&StreamConn) write_string

fn (mut c &StreamConn) write_string(s string) !int

write_string blocks and attempts to write all data

#fn (&StreamConn) read_ptr

fn (mut c &StreamConn) read_ptr(buf_ptr &u8, len int) !int

#fn (&StreamConn) read

fn (mut c &StreamConn) read(mut buf &[]u8) !int

#fn (&StreamConn) read_deadline

fn (mut c &StreamConn) read_deadline() !time.Time

#fn (&StreamConn) set_read_deadline

fn (mut c &StreamConn) set_read_deadline(deadline time.Time)

#fn (&StreamConn) write_deadline

fn (mut c &StreamConn) write_deadline() !time.Time

#fn (&StreamConn) set_write_deadline

fn (mut c &StreamConn) set_write_deadline(deadline time.Time)

#fn (&StreamConn) read_timeout

fn (c &StreamConn) read_timeout() time.Duration

#fn (&StreamConn) set_read_timeout

fn (mut c &StreamConn) set_read_timeout(t time.Duration)

#fn (&StreamConn) write_timeout

fn (c &StreamConn) write_timeout() time.Duration

#fn (&StreamConn) set_write_timeout

fn (mut c &StreamConn) set_write_timeout(t time.Duration)

#fn (&StreamConn) wait_for_read

inline
fn (mut c &StreamConn) wait_for_read() !

#fn (&StreamConn) wait_for_write

inline
fn (mut c &StreamConn) wait_for_write() !

#fn (StreamConn) str

fn (c StreamConn) str() string

#struct StreamListener

pub struct StreamListener {
pub mut:
	sock StreamSocket
mut:
	accept_timeout  time.Duration
	accept_deadline time.Time
}

#fn (&StreamListener) accept

fn (mut l &StreamListener) accept() !&StreamConn

#fn (&StreamListener) accept_deadline

fn (c &StreamListener) accept_deadline() !time.Time

#fn (&StreamListener) set_accept_deadline

fn (mut c &StreamListener) set_accept_deadline(deadline time.Time)

#fn (&StreamListener) accept_timeout

fn (c &StreamListener) accept_timeout() time.Duration

#fn (&StreamListener) set_accept_timeout

fn (mut c &StreamListener) set_accept_timeout(t time.Duration)

#fn (&StreamListener) wait_for_accept

fn (mut c &StreamListener) wait_for_accept() !

#fn (&StreamListener) close

fn (mut c &StreamListener) close() !

Interfaces

This section is empty.

Enums

This section is empty.