NetPeer Class |
LiteNetLib |
Network peer. Main purpose is sending messages to specific peer.
Inheritance Hierarchy
Namespace: LiteNetLib
Assembly: LiteNetLib (in LiteNetLib.dll) Version: 1.0.0.0
Syntax
C#
public sealed class NetPeer
The NetPeer type exposes the following members.
Properties
Name | Description | |
---|---|---|
ConnectId |
Connection id for internal purposes, but can be used as key in your dictionary of peers
| |
ConnectionState |
Current connection state
| |
CurrentFlowMode | ||
EndPoint |
Peer ip address and port
| |
Mtu |
Current MTU - Maximum Transfer Unit ( maximum udp packet size without fragmentation )
| |
NetManager |
Peer parent NetManager
| |
PacketsCountInReliableOrderedQueue | ||
PacketsCountInReliableQueue | ||
Ping |
Current ping in milliseconds
| |
TimeSinceLastPacket |
Time since last packet received (including internal library packets)
|
Methods
Name | Description | |
---|---|---|
Flush |
Flush all queued packets
| |
GetMaxSinglePacketSize |
Gets maximum size of packet that will be not fragmented.
| |
Send(Byte, SendOptions) |
Send data to peer
| |
Send(NetDataWriter, SendOptions) |
Send data to peer
| |
Send(Byte, Int32, Int32, SendOptions) |
Send data to peer
|
Fields
Name | Description | |
---|---|---|
Tag |
Application defined object containing data about the connection
|
See Also