Class Lidgren::Network::NetPeerConfiguration
ClassList > Lidgren > Network > NetPeerConfiguration
Partly immutable after NetPeer has been initialized.
Public Static Attributes
Type | Name |
---|---|
const int | kDefaultMTU = = 1408 Default MTU value in bytes. |
Public Properties
Type | Name |
---|---|
property bool | AcceptIncomingConnections Gets or sets if the NetPeer should accept incoming connections. This is automatically set to true in NetServer and false in NetClient. |
property string | AppIdentifier Gets the identifier of this application; the library can only connect to matching app identifier peers. |
property bool | AutoExpandMTU Gets or sets if the NetPeer should send large messages to try to expand the maximum transmission unit size. |
property bool | AutoFlushSendQueue Enables or disables automatic flushing of the send queue. If disabled, you must manully call NetPeer.FlushSendQueue() to flush sent messages to network. |
property IPAddress | BroadcastAddress Gets or sets the local broadcast address to use when broadcasting. |
property float | ConnectionTimeout Gets or sets the number of seconds timeout will be postponed on a successful ping/pong. |
property int | DefaultOutgoingMessageCapacity Gets or sets the default capacity in bytes when NetPeer.CreateMessage() is called without argument. |
property bool | EnableUPnP Enables UPnP support; enabling port forwarding and getting external ip. |
property int | ExpandMTUFailAttempts Gets or sets the number of failed expand mtu attempts to perform before setting final MTU. |
property float | ExpandMTUFrequency Gets or sets how often to send large messages to expand MTU if AutoExpandMTU is enabled. |
property IPAddress | LocalAddress Gets or sets the local ip address to bind to. Defaults to IPAddress.Any. Cannot be changed once NetPeer is initialized. |
property int | MaximumConnections Gets or sets the maximum amount of connections this peer can hold. Cannot be changed once NetPeer is initialized. |
property int | MaximumHandshakeAttempts Gets or sets the maximum number of handshake attempts before failing to connect. |
property int | MaximumTransmissionUnit Gets or sets the maximum amount of bytes to send in a single packet, excluding ip, udp and lidgren headers. Cannot be changed once NetPeer is initialized. |
property string | NetworkThreadName Gets or sets the name of the library network thread. Cannot be changed once NetPeer is initialized. |
property float | PingInterval Gets or sets the time between latency calculating pings. |
property int | Port Gets or sets the local port to bind to. Defaults to 0. Cannot be changed once NetPeer is initialized. |
property int | ReceiveBufferSize Gets or sets the size in bytes of the receiving buffer. Defaults to 131071 bytes. Cannot be changed once NetPeer is initialized. |
property int | RecycledCacheMaxCount Gets or sets the maximum number of incoming/outgoing messages to keep in the recycle cache. |
property float | ResendHandshakeInterval Gets or sets the number of seconds between handshake attempts. |
property int | SendBufferSize Gets or sets the size in bytes of the sending buffer. Defaults to 131071 bytes. Cannot be changed once NetPeer is initialized. |
property bool | SuppressUnreliableUnorderedAcks If true, will not send acks for unreliable unordered messages. This will save bandwidth, but disable flow control and duplicate detection for this type of messages. |
property NetUnreliableSizeBehaviour | UnreliableSizeBehaviour Gets or sets the behaviour of unreliable sends above MTU. |
property bool | UseMessageRecycling Gets or sets if the library should recycling messages to avoid excessive garbage collection. Cannot be changed once NetPeer is initialized. |
Public Functions
Type | Name |
---|---|
NetPeerConfiguration | Clone () Creates a memberwise shallow clone of this configuration. |
void | DisableMessageType (NetIncomingMessageType type) Disables receiving of the specified type of message. |
void | EnableMessageType (NetIncomingMessageType type) Enables receiving of the specified type of message. |
bool | IsMessageTypeEnabled (NetIncomingMessageType type) Gets if receiving of the specified type of message is enabled. |
NetPeerConfiguration (string appIdentifier) NetPeerConfiguration constructor. |
|
void | SetMessageTypeEnabled (NetIncomingMessageType type, bool enabled) Enables or disables receiving of the specified type of message. |
Public Static Attributes Documentation
variable kDefaultMTU
Public Properties Documentation
property AcceptIncomingConnections
property AppIdentifier
property AutoExpandMTU
property AutoFlushSendQueue
property BroadcastAddress
property ConnectionTimeout
property DefaultOutgoingMessageCapacity
property EnableUPnP
property ExpandMTUFailAttempts
property ExpandMTUFrequency
property LocalAddress
property MaximumConnections
property MaximumHandshakeAttempts
property MaximumTransmissionUnit
property NetworkThreadName
property PingInterval
property Port
property ReceiveBufferSize
property RecycledCacheMaxCount
property ResendHandshakeInterval
property SendBufferSize
property SuppressUnreliableUnorderedAcks
property UnreliableSizeBehaviour
property UseMessageRecycling
Public Functions Documentation
function Clone
function DisableMessageType
inline void Lidgren::Network::NetPeerConfiguration::DisableMessageType (
NetIncomingMessageType type
)
function EnableMessageType
inline void Lidgren::Network::NetPeerConfiguration::EnableMessageType (
NetIncomingMessageType type
)
function IsMessageTypeEnabled
inline bool Lidgren::Network::NetPeerConfiguration::IsMessageTypeEnabled (
NetIncomingMessageType type
)
function NetPeerConfiguration
function SetMessageTypeEnabled
inline void Lidgren::Network::NetPeerConfiguration::SetMessageTypeEnabled (
NetIncomingMessageType type,
bool enabled
)
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Lidgren.Network/NetPeerConfiguration.cs