- NN_CMSG_ALIGN_
auto NN_CMSG_ALIGN_(long len)
rewritten from lambda syntax because libdparse does not recognise alias to a lambda
and docs won't be built because adrdox depends on it
- NN_CMSG_DATA
ubyte* NN_CMSG_DATA(T* cmsg)
posix-defined msghdr manipulation
- NN_CMSG_FIRSTHDR
auto NN_CMSG_FIRSTHDR(T* mhdr)
posix-defined msghdr manipulation
- NN_CMSG_LEN
auto NN_CMSG_LEN(size_t len)
Extension to POSIX defined by RFC 3542.
- NN_CMSG_NXTHDR
auto NN_CMSG_NXTHDR(T* mhdr, U* cmsg)
posix-defined msghdr manipulation
- NN_CMSG_SPACE
auto NN_CMSG_SPACE(size_t len)
Extension to POSIX defined by RFC 3542.
- nn_allocmsg
void* nn_allocmsg(size_t size, int type)
- nn_bind
int nn_bind(int s, const(char)* addr)
- nn_close
int nn_close(int s)
- nn_cmsg_nexthdr_
nn_cmsghdr* nn_cmsg_nexthdr_(const(nn_msghdr)* mhdr, const(nn_cmsghdr)* cmsg)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
- nn_connect
int nn_connect(int s, const(char)* addr)
- nn_device
int nn_device(int s1, int s2)
Built-in support for devices.
- nn_epbase_clear_error
void nn_epbase_clear_error(nn_epbase* self)
- nn_epbase_clear_error
void nn_epbase_clear_error(nn_epbase* self)
Notifies a monitoring system that error is gone
- nn_epbase_getaddr
const(char*) nn_epbase_getaddr(nn_epbase* self)
Returns the address string associated with this endpoint.
- nn_epbase_getaddr
char* nn_epbase_getaddr(nn_epbase* self)
- nn_epbase_getctx
nn_ctx* nn_epbase_getctx(nn_epbase* self)
Returns the AIO context associated with the endpoint.
- nn_epbase_getctx
nn_ctx* nn_epbase_getctx(nn_epbase* self)
- nn_epbase_getopt
void nn_epbase_getopt(nn_epbase* self, int level, int option, void* optval, size_t* optvallen)
Retrieve value of a socket option.
- nn_epbase_getopt
void nn_epbase_getopt(nn_epbase* self, int level, int option, void* optval, size_t* optvallen)
- nn_epbase_init
void nn_epbase_init(nn_epbase* self, const(nn_epbase_vfptr)* vfptr, void* hint)
Creates a new endpoint. 'hint' parameter is an opaque value that
was passed to transport's bind or connect function.
- nn_epbase_init
void nn_epbase_init(nn_epbase* self, nn_epbase_vfptr* vfptr, void* hint)
- nn_epbase_ispeer
int nn_epbase_ispeer(nn_epbase* self, int socktype)
- nn_epbase_ispeer
int nn_epbase_ispeer(nn_epbase* self, int socktype)
- nn_epbase_set_error
void nn_epbase_set_error(nn_epbase* self, int errnum)
- nn_epbase_set_error
void nn_epbase_set_error(nn_epbase* self, int errnum)
Notifies a monitoring system the error on this endpoint
- nn_epbase_stat_increment
void nn_epbase_stat_increment(nn_epbase* self, int name, int increment)
- nn_epbase_stat_increment
void nn_epbase_stat_increment(nn_epbase* self, int name, int increment)
Increments statistics counters in the socket structure
- nn_epbase_stopped
void nn_epbase_stopped(nn_epbase* self)
Notify the user that stopping is done.
- nn_epbase_stopped
void nn_epbase_stopped(nn_epbase* self)
- nn_epbase_term
void nn_epbase_term(nn_epbase* self)
Terminate the epbase object.
- nn_epbase_term
void nn_epbase_term(nn_epbase* self)
- nn_errno
int nn_errno()
This function retrieves the errno as it is known to the library.
The goal of this function is to make the code 100% portable, including
where the library is compiled with certain CRT library (on Windows) and
linked to an application that uses different CRT library.
- nn_freemsg
int nn_freemsg(void* msg)
- nn_fsm_action
void nn_fsm_action(nn_fsm* , int type)
- nn_fsm_choose_worker
nn_worker* nn_fsm_choose_worker(nn_fsm* )
- nn_fsm_event_active
int nn_fsm_event_active(nn_fsm_event* self)
- nn_fsm_event_init
void nn_fsm_event_init(nn_fsm_event* self)
- nn_fsm_event_process
void nn_fsm_event_process(nn_fsm_event* self)
- nn_fsm_event_term
void nn_fsm_event_term(nn_fsm_event* self)
- nn_fsm_feed
void nn_fsm_feed(nn_fsm* , int src, int type, void* srcptr)
- nn_fsm_init
void nn_fsm_init(nn_fsm* , nn_fsm_fn fn, nn_fsm_fn shutdown_fn, int src, void* srcptr, nn_fsm* owner)
- nn_fsm_init_root
void nn_fsm_init_root(nn_fsm* self, nn_fsm_fn fn, nn_fsm_fn shutdown_fn, nn_ctx* ctx)
- nn_fsm_isidle
int nn_fsm_isidle(nn_fsm* )
- nn_fsm_raise
void nn_fsm_raise(nn_fsm* , nn_fsm_event* event, int type)
- nn_fsm_raiseto
void nn_fsm_raiseto(nn_fsm* , nn_fsm* dst, nn_fsm_event* event, int src, int type, void* srcptr)
- nn_fsm_start
void nn_fsm_start(nn_fsm* )
- nn_fsm_stop
void nn_fsm_stop(nn_fsm* )
- nn_fsm_stopped
void nn_fsm_stopped(nn_fsm* , int type)
- nn_fsm_stopped_noevent
void nn_fsm_stopped_noevent(nn_fsm* )
- nn_fsm_swap_owner
void nn_fsm_swap_owner(nn_fsm* , nn_fsm_owner* owner)
- nn_fsm_term
void nn_fsm_term(nn_fsm* )
- nn_getsockopt
int nn_getsockopt(int s, int level, int option, void* optval, size_t* optvallen)
- nn_list_begin
nn_list_item* nn_list_begin(nn_list* )
- nn_list_empty
int nn_list_empty(nn_list* )
- nn_list_end
nn_list_item* nn_list_end(nn_list* )
- nn_list_erase
nn_list_item* nn_list_erase(nn_list* , nn_list_item* )
- nn_list_init
void nn_list_init(nn_list* )
- nn_list_insert
void nn_list_insert(nn_list* , nn_list_item* , nn_list_item* )
- nn_list_item_init
void nn_list_item_init(nn_list_item* )
- nn_list_item_isinlist
int nn_list_item_isinlist(nn_list_item* )
- nn_list_item_term
void nn_list_item_term(nn_list_item* )
- nn_list_next
nn_list_item* nn_list_next(nn_list* , nn_list_item* )
- nn_list_prev
nn_list_item* nn_list_prev(nn_list* , nn_list_item* )
- nn_list_term
void nn_list_term(nn_list* )
- nn_pipe_getdata
void* nn_pipe_getdata(nn_pipe* self)
Retrieves the opaque pointer associated with the pipe.
- nn_pipe_getdata
void* nn_pipe_getdata(nn_pipe* self)
- nn_pipe_getdata
void* nn_pipe_getdata(nn_pipe* self)
- nn_pipe_getopt
void nn_pipe_getopt(nn_pipe* self, int level, int option, void* optval, size_t* optvallen)
Get option for pipe. Mostly useful for endpoint-specific options
- nn_pipe_getopt
void nn_pipe_getopt(nn_pipe* self, int level, int option, void* optval, size_t* optvallen)
- nn_pipe_getopt
void nn_pipe_getopt(nn_pipe* self, int level, int option, void* optval, size_t* optvallen)
- nn_pipe_recv
int nn_pipe_recv(nn_pipe* self, nn_msg* msg)
Receive a message from a pipe. 'msg' should not be initialised prior to the call.
It will be initialised when the call succeeds.
- nn_pipe_recv
int nn_pipe_recv(nn_pipe* self, nn_msg* msg)
- nn_pipe_recv
int nn_pipe_recv(nn_pipe* self, nn_msg* msg)
- nn_pipe_send
int nn_pipe_send(nn_pipe* self, nn_msg* msg)
Send the message to the pipe. If successful, pipe takes ownership of the messages.
- nn_pipe_send
int nn_pipe_send(nn_pipe* self, nn_msg* msg)
- nn_pipe_send
int nn_pipe_send(nn_pipe* self, nn_msg* msg)
- nn_pipe_setdata
void nn_pipe_setdata(nn_pipe* self, void* data)
Associates opaque pointer to protocol-specific data with the pipe.
- nn_pipe_setdata
void nn_pipe_setdata(nn_pipe* self, void* data)
- nn_pipe_setdata
void nn_pipe_setdata(nn_pipe* self, void* data)
- nn_pipebase_getopt
void nn_pipebase_getopt(nn_pipebase* self, int level, int option, void* optval, size_t* optvallen)
Retrieve value of a socket option.
- nn_pipebase_getopt
void nn_pipebase_getopt(nn_pipebase* , int level, int option, void* optval, size_t* optvallen)
- nn_pipebase_init
void nn_pipebase_init(nn_pipebase* , const(nn_pipebase_vfptr)* vfptr, nn_epbase* epbase)
- nn_pipebase_init
void nn_pipebase_init(nn_pipebase* self, const(nn_pipebase_vfptr)* vfptr, nn_epbase* epbase)
- nn_pipebase_ispeer
int nn_pipebase_ispeer(nn_pipebase* , int socktype)
- nn_pipebase_ispeer
int nn_pipebase_ispeer(nn_pipebase* self, int socktype)
Returns 1 is the specified socket type is a valid peer for this socket, or 0 otherwise.
- nn_pipebase_received
void nn_pipebase_received(nn_pipebase* self)
Call this function when new message was fully received.
- nn_pipebase_received
void nn_pipebase_received(nn_pipebase* )
- nn_pipebase_sent
void nn_pipebase_sent(nn_pipebase* self)
Call this function when current outgoing message was fully sent.
- nn_pipebase_sent
void nn_pipebase_sent(nn_pipebase* )
- nn_pipebase_start
int nn_pipebase_start(nn_pipebase* self)
Call this function once the connection is established.
- nn_pipebase_start
int nn_pipebase_start(nn_pipebase* )
- nn_pipebase_stop
void nn_pipebase_stop(nn_pipebase* self)
Call this function once the connection is broken.
- nn_pipebase_stop
void nn_pipebase_stop(nn_pipebase* )
- nn_pipebase_term
void nn_pipebase_term(nn_pipebase* self)
- nn_pipebase_term
void nn_pipebase_term(nn_pipebase* )
- nn_poll
int nn_poll(nn_pollfd* fds, int nfds, int timeout)
- nn_queue_empty
int nn_queue_empty(nn_queue* )
- nn_queue_init
void nn_queue_init(nn_queue* )
- nn_queue_item_init
void nn_queue_item_init(nn_queue_item* )
- nn_queue_item_isinqueue
int nn_queue_item_isinqueue(nn_queue_item* )
- nn_queue_item_term
void nn_queue_item_term(nn_queue_item* )
- nn_queue_pop
nn_queue_item* nn_queue_pop(nn_queue* )
- nn_queue_push
void nn_queue_push(nn_queue* , nn_queue_item* )
- nn_queue_term
void nn_queue_term(nn_queue* )
- nn_reallocmsg
void* nn_reallocmsg(void* msg, size_t size)
- nn_recv
int nn_recv(int s, void* buf, size_t len, int flags)
- nn_recvmsg
int nn_recvmsg(int s, nn_msghdr* msghdr, int flags)
- nn_req_recv
int nn_req_recv(int s, nn_req_handle* hndl, void* buf, size_t len, int flags)
- nn_req_send
int nn_req_send(int s, nn_req_handle hndl, const(void)* buf, size_t len, int flags)
- nn_send
int nn_send(int s, const(void)* buf, size_t len, int flags)
- nn_sendmsg
int nn_sendmsg(int s, const(nn_msghdr)* msghdr, int flags)
- nn_sendmsg
int nn_sendmsg(int s, nn_msghdr* msghdr, int flags)
- nn_setsockopt
int nn_setsockopt(int s, int level, int option, const(void)* optval, size_t optvallen)
- nn_shutdown
int nn_shutdown(int s, int how)
- nn_sockbase_getctx
nn_ctx* nn_sockbase_getctx(nn_sockbase* self)
Returns the AIO context associated with the socket. This function is
useful when socket type implementation needs to create async objects,
such as timers.
- nn_sockbase_getctx
nn_ctx* nn_sockbase_getctx(nn_sockbase* self)
Returns the AIO context associated with the socket. This function is
useful when socket type implementation needs to create async objects,
such as timers.
- nn_sockbase_getopt
int nn_sockbase_getopt(nn_sockbase* self, int option, void* optval, size_t* optvallen)
Retrieve a NN_SOL_SOCKET-level option.
- nn_sockbase_getopt
int nn_sockbase_getopt(nn_sockbase* self, int option, void* optval, size_t* optvallen)
Retrieve a NN_SOL_SOCKET-level option.
- nn_sockbase_init
void nn_sockbase_init(nn_sockbase* self, nn_sockbase_vfptr* vfptr, void* hint)
Initialise the socket base class. 'hint' is the opaque value passed to the
nn_transport's 'create' function.
- nn_sockbase_init
void nn_sockbase_init(nn_sockbase* self, const(nn_sockbase_vfptr)* vfptr, void* hint)
Base class for all socket types:
Initialise the socket base class. 'hint' is the opaque value passed to the
nn_transport's 'create' function.
- nn_sockbase_stat_increment
void nn_sockbase_stat_increment(nn_sockbase* self, int name, int increment)
Add some statistics for socket
- nn_sockbase_stat_increment
void nn_sockbase_stat_increment(nn_sockbase* self, int name, int increment)
Add some statistics for socket
- nn_sockbase_stopped
void nn_sockbase_stopped(nn_sockbase* self)
Call this function when stopping is done.
- nn_sockbase_stopped
void nn_sockbase_stopped(nn_sockbase* self)
Call this function when stopping is done.
- nn_sockbase_term
void nn_sockbase_term(nn_sockbase* self)
Terminate the socket base class.
- nn_sockbase_term
void nn_sockbase_term(nn_sockbase* self)
Terminate the socket base class.
- nn_socket
int nn_socket(int domain, int protocol)
- nn_strerror
const(char)* nn_strerror(int errnum)
Resolves system errors and native errors to human-readable string.
- nn_symbol
const(char)* nn_symbol(int i, int* value)
Returns the symbol name (e.g. "NN_REQ") and value at a specified index.
If the index is out-of-range, returns null and sets errno to EINVAL
General usage is to start at i=0 and iterate until null is returned.
- nn_symbol
char* nn_symbol(int i, int* value)
Symbols:
Returns the symbol name (e.g. "NN_REQ") and value at a specified index.
If the index is out-of-range, returns 0 and sets errno to EINVAL
General usage is to start at i=0 and iterate until 0 is returned.
- nn_symbol_info
int nn_symbol_info(int i, nn_symbol_properties* buf, int buflen)
Fills in nn_symbol_properties structure and returns it's length
If the index is out-of-range, returns 0
General usage is to start at i=0 and iterate until zero is returned.
- nn_tcpmuxd
int nn_tcpmuxd(int port)
Built-in support for multiplexers.
- nn_term
void nn_term()
Helper function for shutting down multi-threaded applications
http://nanomsg.org
nanomsg is a socket library that provides several common communication patterns. It aims to make the networking layer fast, scalable, and easy to use. Implemented in C, it works on a wide range of operating systems with no further dependencies.
This module implements D bindings for nanomsg.