constructor
constructor
constructor
destructor
this(this) disabled to avoid sockets being destroyed
bind
close socket
connect
get socket option value
Same as the revelant constructor, can be used on exisiting objects
Same as the revelant constructor, can be used on exisiting objects
Same as the revelant constructor, can be used on exisiting objects
get the underlying nanomsg socket file descriptor. Bear in mind that NanoSocket contains state about the socket options, so changing these from the raw fd will result in unpredictable behaviour
get protocol
Receive bytes on this socket. Memory is allocated by nanomsg and deleted in the NanoBuffer destructor.
A version of receive that takes a user supplied buffer to fill
Sends the bytes as expected. If the protocol is Request, then returns the response, otherwise returns a view of the input data.
set socket option to a value
toString
Tries to send bytes to the other side. duration is how long to try for recvBlocking controls whether or not to block on reception of a response. This only matters when the protocol is request/response Returns the response if in request mode, otherwise an empty byte slice.
Tries to send bytes to the other side. duration is how long to try for recvBlocking controls whether or not to block on reception of a response. This only matters when the protocol is request/response Returns the response if in request mode, otherwise an empty byte slice.
get URI
invalid FD
NanoSocket - high level wrapper for a nanomsg socket