Click or drag to resize

NetPeerConfiguration Class

Partly immutable after NetPeer has been initialized
Inheritance Hierarchy
SystemObject
  Internal.Lidgren.NetworkNetPeerConfiguration

Namespace:  Internal.Lidgren.Network
Assembly:  NeoAxis.Core (in NeoAxis.Core.dll) Version: 2024.1.1.0 (2024.1.1.0)
Syntax
C#
public sealed class NetPeerConfiguration

The NetPeerConfiguration type exposes the following members.

Constructors
  NameDescription
Public methodNetPeerConfiguration
NetPeerConfiguration constructor
Top
Properties
  NameDescription
Public propertyAcceptIncomingConnections
Gets or sets if the NetPeer should accept incoming connections. This is automatically set to true in NetServer and false in NetClient.
Public propertyAppIdentifier
Gets the identifier of this application; the library can only connect to matching app identifier peers
Public propertyAutoExpandMTU
Gets or sets if the NetPeer should send large messages to try to expand the maximum transmission unit size
Public propertyAutoFlushSendQueue
Enables or disables automatic flushing of the send queue. If disabled, you must manully call NetPeer.FlushSendQueue() to flush sent messages to network.
Public propertyBroadcastAddress
Gets or sets the local broadcast address to use when broadcasting
Public propertyConnectionTimeout
Gets or sets the number of seconds timeout will be postponed on a successful ping/pong
Public propertyDefaultOutgoingMessageCapacity
Gets or sets the default capacity in bytes when NetPeer.CreateMessage() is called without argument
Public propertyDualStack
Gets or sets a value indicating whether the library should use IPv6 dual stack mode. If you enable this you should make sure that the LocalAddress is an IPv6 address. Cannot be changed once NetPeer is initialized.
Public propertyEnableUPnP
Enables UPnP support; enabling port forwarding and getting external ip
Public propertyExpandMTUFailAttempts
Gets or sets the number of failed expand mtu attempts to perform before setting final MTU
Public propertyExpandMTUFrequency
Gets or sets how often to send large messages to expand MTU if AutoExpandMTU is enabled
Public propertyLocalAddress
Gets or sets the local ip address to bind to. Defaults to IPAddress.Any. Cannot be changed once NetPeer is initialized.
Public propertyMaximumConnections
Gets or sets the maximum amount of connections this peer can hold. Cannot be changed once NetPeer is initialized.
Public propertyMaximumHandshakeAttempts
Gets or sets the maximum number of handshake attempts before failing to connect
Public propertyMaximumTransmissionUnit
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.
Public propertyNetworkThreadName
Gets or sets the name of the library network thread. Cannot be changed once NetPeer is initialized.
Public propertyPingInterval
Gets or sets the time between latency calculating pings
Public propertyPort
Gets or sets the local port to bind to. Defaults to 0. Cannot be changed once NetPeer is initialized.
Public propertyReceiveBufferSize
Gets or sets the size in bytes of the receiving buffer. Defaults to 131071 bytes. Cannot be changed once NetPeer is initialized.
Public propertyRecycledCacheMaxCount
Gets or sets the maximum number of incoming/outgoing messages to keep in the recycle cache.
Public propertyResendHandshakeInterval
Gets or sets the number of seconds between handshake attempts
Public propertySendBufferSize
Gets or sets the size in bytes of the sending buffer. Defaults to 131071 bytes. Cannot be changed once NetPeer is initialized.
Public propertySuppressUnreliableUnorderedAcks
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.
Public propertyUnreliableSizeBehaviour
Gets or sets the behaviour of unreliable sends above MTU
Public propertyUseMessageRecycling
Gets or sets if the library should recycling messages to avoid excessive garbage collection. Cannot be changed once NetPeer is initialized.
Top
Methods
  NameDescription
Public methodClone
Creates a memberwise shallow clone of this configuration
Public methodDisableMessageType
Disables receiving of the specified type of message
Public methodEnableMessageType
Enables receiving of the specified type of message
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsMessageTypeEnabled
Gets if receiving of the specified type of message is enabled
Public methodSetMessageTypeEnabled
Enables or disables receiving of the specified type of message
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldStatic memberkDefaultMTU
Default MTU value in bytes
Top
Extension Methods
See Also