NetPeer Class

LiteNetLib

NetPeer Class

LiteNetLib
Network peer. Main purpose is sending messages to specific peer.
Inheritance Hierarchy

SystemObject  LiteNetLibNetPeer

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

  NameDescription
Public propertyConnectId
Connection id for internal purposes, but can be used as key in your dictionary of peers
Public propertyConnectionState
Current connection state
Public propertyCurrentFlowMode
Public propertyEndPoint
Peer ip address and port
Public propertyMtu
Current MTU - Maximum Transfer Unit ( maximum udp packet size without fragmentation )
Public propertyNetManager
Peer parent NetManager
Public propertyPacketsCountInReliableOrderedQueue
Public propertyPacketsCountInReliableQueue
Public propertyPing
Current ping in milliseconds
Public propertyTimeSinceLastPacket
Time since last packet received (including internal library packets)
Top
Methods

  NameDescription
Public methodFlush
Flush all queued packets
Public methodGetMaxSinglePacketSize
Gets maximum size of packet that will be not fragmented.
Public methodSend(Byte, SendOptions)
Send data to peer
Public methodSend(NetDataWriter, SendOptions)
Send data to peer
Public methodSend(Byte, Int32, Int32, SendOptions)
Send data to peer
Top
Fields

  NameDescription
Public fieldTag
Application defined object containing data about the connection
Top
See Also

Reference