ENet Class Library for C#

ENet Namespace

ENet is a UDP-based networking library for transmitting packets reliably and unreliably, sequenced and unsequenced, and with multiple channels per connection. In a game, for example, you can send chat and status updates reliably and positions unreliably, and in the event of packet loss the two will not interfere nor will there be lag on future position updates. Were you to use TCP, on the other hand, a "lag burst" would occur affecting all data, ending only on reception of the lost packet's retry.

Namespace Hierarchy

Classes

Class Description
ENetException This exception is thrown when ENet has an error.
Library Provides initialization, deinitialization, and time-keeping methods.

Structures

Structure Description
Event Represents an event from the Service method.
Host Acts as either client or peer-to-peer/server.
Packet Contains data received or to be sent.
Peer Represents a connection with another computer.

Delegates

Delegate Description
PacketFreeCallback Called when ENet is finished with a packet and it is about to be freed from memory.

Enumerations

Enumeration Description
EventType Specifies types of events that can occur.
PacketFlags Specifies outgoing packet transmittion behavior.
PeerState Enumerates the possible peer states.