Enum udt::SocketType [] [src]

pub enum SocketType {
    Stream,
    Datagram,
}

Socket type

When a UDT socket is created as a Datagram type, UDT will send and receive data as messages. The boundary of the message is preserved and the message is delivered as a whole unit. Sending or receving messages do not need a loop; a message will be either completely delivered or not delivered at all. However, at the receiver side, if the user buffer is shorter than the message length, only part of the message will be copied into the user buffer while the message will still be discarded.

Variants

Stream

A socket type that supports data streaming

Datagram

A socket type for messaging

Note that UDT Datagram sockets are also connection oriented. A UDT connection can only be set up between the same socket types