Struct nng::RawSocket [−][src]
pub struct RawSocket {
pub socket: Socket,
// some fields omitted
}
Expand description
A socket that is open in “raw” mode.
Most NNG applications will interact with sockets in “cooked” mode. This mode will automatically handle the full semantics of the protocol, such as req sockets automatically matching a reply to a request or resenting a request periodically if no reply was received.
However, there are situations, such as with proxies, where it is desirable to bypass these semantics and pass messages without any extra handling. This is possible with “raw” mode sockets.
When using these sockets, the user is responsible for applying any
additional socket semantics which typically means inspecting the message
Header
on incoming messages and supplying them on outgoing messages.
Fields
socket: Socket
The NNG socket.
Implementations
Creates a new “raw” socket of the specified protocol.
Errors
NotSupported
: Protocol is not enabled.OutOfMemory
: Insufficient memory available.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for RawSocket
impl UnwindSafe for RawSocket
Blanket Implementations
Mutably borrows from an owned value. Read more