Crate laminar[][src]

Laminar is an application-level transport protocol which provides configurable reliability and ordering guarantees built on top of UDP. It focuses on fast-paced fps-games and provides a lightweight, message-based interface.

Laminar was designed to be used within the Amethyst game engine but is usable without it.

Concepts

This library is loosely based off of Gaffer on Games and has features similar to RakNet, Steam Socket, and netcode.io. The idea is to provide a native Rust low-level UDP-protocol which supports the use of cases of video games that require multiplayer features. The library itself provides a few low-level types of packets that provide different types of guarantees. The most basic are unreliable and reliable packets. Ordering, sequencing can be done on multiple streams. For more information, read the projects README.md, book, docs or examples.

Structs

Config

Contains the configuration options to configure laminar for special use-cases.

ConnectionManager

Implements a concept of connections on top of datagram socket. Connection capabilities depends on what is an actual Connection type. Connection type also defines a type of sending and receiving events.

LinkConditioner

Network simulator. Used to simulate network conditions as dropped packets and packet delays. For use in FakeSocket::set_link_conditioner.

Packet

This is a user friendly packet containing the payload, endpoint, and reliability guarantees. A packet could have reliability guarantees to specify how it should be delivered and processed.

Socket

A reliable UDP socket implementation with configurable reliability and ordering guarantees.

VirtualConnection

Contains the information about a certain ‘virtual connection’ over udp. This connections also keeps track of network quality, processing packets, buffering data related to connection etc.

Enums

DeliveryGuarantee

Enum to specify how a packet should be delivered.

ErrorKind

Enum with all possible network errors that could occur.

OrderingGuarantee

Enum to specify how a packet should be arranged.

SocketEvent

Events that can occur in laminar and that will be pushed through the event_receiver returned by Socket::bind.

Traits

Connection

Allows to implement actual connection. Defines a type of Send and Receive events, that will be used by a connection.

ConnectionMessenger

Allows connection to send packet, send event and get global configuration.

DatagramSocket

A datagram socket is a type of network socket which provides a connectionless point for sending or receiving data packets.

Type Definitions

Result

Wrapped result type for Laminar errors.