pub struct RawSocket {
pub socket: Socket,
/* private fields */
}
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§
Trait Implementations§
Source§impl Ord for RawSocket
impl Ord for RawSocket
Source§impl PartialOrd for RawSocket
impl PartialOrd for RawSocket
impl Eq for RawSocket
impl StructuralPartialEq for RawSocket
Auto Trait Implementations§
impl Freeze for RawSocket
impl RefUnwindSafe for RawSocket
impl Send for RawSocket
impl Sync for RawSocket
impl Unpin for RawSocket
impl UnwindSafe for RawSocket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more