Click or drag to resize

LiteNetManager Fields

The LiteNetManager type exposes the following members.

Fields
 NameDescription
Protected field_headPeer 
Protected field_peersLock 
Protected field_udpSocketv4 
Public fieldAllowPeerAddressChange Allows peer change it's ip (lte to wifi, wifi to lte, etc). Use only on server
Public fieldAutoRecycle Automatically recycle NetPacketReader after OnReceive event
Public fieldBroadcastReceiveEnabled Allows receive broadcast packets
Public fieldDisconnectOnUnreachable Disconnect peers if HostUnreachable or NetworkUnreachable spawned (old behaviour 0.9.x was true)
Public fieldDisconnectTimeout If NetManager doesn't receive any packet from remote peer during this time (in milliseconds) then connection will be closed (including library internal keepalive packets)
Public fieldDontRoute UDP Only Socket Option Normally IP sockets send packets of data through routers and gateways until they reach the final destination. If the DontRoute flag is set to True, then data will be delivered on the local subnet only.
Public fieldEnableStatistics Toggles the collection of network statistics for the instance and all known peers
Public fieldIPv6Enabled IPv6 support
Public fieldStatic memberIPv6Support 
Public fieldMaxConnectAttempts Maximum connection attempts before client stops and call disconnect event.
Public fieldMaxFragmentsCount Max fragmented packets size for reliable channels - that equals to data of size fragments count * (MTU-reliable header size)
Public fieldMaxPacketPerManualReceive Maximum packets that can be received per one ManualReceive (PollEvents when started using StartInManualMode) 0 - infinite - but this can cause some big delays there is too many incoming packets
Public fieldMtuDiscovery Automatically discovery mtu starting from. Use at own risk because some routers can break MTU detection and connection in result
Public fieldMtuOverride Override MTU for all new peers registered in this NetManager, will ignores MTU Discovery!
Public fieldNatPunchEnabled Enable nat punch messages
Public fieldPacketPoolSize Maximum packet pool size (increase if you have tons of packets sending)
Public fieldPingInterval Interval for latency detection and checking connection (in milliseconds)
Public fieldReceivePollingTime Poll timeout in microseconds. Increasing can slightly increase performance in cost of slow NetManager.Stop(Socket.Close)
Public fieldReconnectDelay Delay between initial connection attempts (in milliseconds)
Public fieldReuseAddress Enables socket option "ReuseAddress" for specific purposes
Public fieldSimulateLatency Simulate latency by holding packets for random time. (Works only in DEBUG builds or when SIMULATE_NETWORK is defined)
Public fieldSimulatePacketLoss Simulate packet loss by dropping random amount of packets. (Works only in DEBUG builds or when SIMULATE_NETWORK is defined)
Public fieldSimulationMaxLatency Maximum simulated round-trip latency (in milliseconds). Actual latency applied per direction is half of this value.
Public fieldSimulationMinLatency Minimum simulated round-trip latency (in milliseconds). Actual latency applied per direction is half of this value.
Public fieldSimulationPacketLossChance Chance of packet loss when simulation enabled. value in percents (1 - 100).
Public fieldStatistics Statistics of all connections
Public fieldUnconnectedMessagesEnabled Enable messages receiving without connection. (with SendUnconnectedMessage method)
Public fieldUnsyncedDeliveryEvent If true - delivery event will be called from "receive" thread immediately otherwise on PollEvents call
Public fieldUnsyncedEvents Events automatically will be called without PollEvents method from another thread
Public fieldUnsyncedReceiveEvent If true - receive event will be called from "receive" thread immediately otherwise on PollEvents call
Public fieldUpdateTime Library logic update and send period in milliseconds Lowest values in Windows doesn't change much because of Thread.Sleep precision To more frequent sends (or sends tied to your game logic) use TriggerUpdate
Public fieldUseNativeSockets Experimental feature mostly for servers. Only for Windows/Linux use direct socket calls for send/receive to drastically increase speed and reduce GC pressure
Top
See Also