Function libzt::zts_tcp_server[][src]

pub unsafe extern "C" fn zts_tcp_server(
    local_ipstr: *const c_char,
    local_port: c_ushort,
    remote_ipstr: *mut c_char,
    len: c_int,
    remote_port: *mut c_ushort
) -> c_int
Expand description

@brief A convenience function that takes a remote address IP string and creates the appropriate type of socket, binds, listens, and then accepts on it.

@param local_ipstr Local address to bind @param local_port Local port to bind @param remote_ipstr String-format IP address of newly connected remote host @param len Length of remote_ipstr @param remote_port Port of remote host

@return New file descriptor if successful, ZTS_ERR_SERVICE if the node experiences a problem, ZTS_ERR_ARG if invalid argument. Sets zts_errno