[][src]Enum nng::options::RecvMaxSize

pub enum RecvMaxSize {}

The maximum message size that the will be accepted from a remote peer.

If a peer attempts to send a message larger than this, then the message will be discarded. If the value of this is zero, then no limit on message sizes is enforced. This option exists to prevent certain kinds of denial-of-service attacks, where a malicious agent can claim to want to send an extraordinarily large message, without sending any data. This option can be set for the socket, but may be overridden for on a per-dialer or per-listener basis.

Note that some transports may have further message size restrictions.

Support

  • Dialers and Listeners can use this with the following transports:
    • TCP
    • ZeroTier
    • IPC
    • TLS
    • WebSocket
  • Pipes can read this value on the following transports:
    • ZeroTier
  • Sockets can utilize this to set a new default value.

Trait Implementations

impl Opt for RecvMaxSize[src]

type OptType = usize

The type that the option read and writes.

impl GetOpt<RecvMaxSize> for Dialer[src]

impl GetOpt<RecvMaxSize> for DialerOptions[src]

impl GetOpt<RecvMaxSize> for Pipe[src]

impl SetOpt<RecvMaxSize> for DialerOptions[src]

impl SetOpt<RecvMaxSize> for ListenerOptions[src]

impl SetOpt<RecvMaxSize> for Socket[src]

impl Clone for RecvMaxSize[src]

impl Copy for RecvMaxSize[src]

impl Eq for RecvMaxSize[src]

impl Ord for RecvMaxSize[src]

impl PartialEq<RecvMaxSize> for RecvMaxSize[src]

impl PartialOrd<RecvMaxSize> for RecvMaxSize[src]

impl Debug for RecvMaxSize[src]

impl Display for RecvMaxSize[src]

impl Hash for RecvMaxSize[src]

impl StructuralPartialEq for RecvMaxSize[src]

impl StructuralEq for RecvMaxSize[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]