diff --git a/LiteNetLib/LiteNetLib.csproj b/LiteNetLib/LiteNetLib.csproj index 75e1ad3b..04b21b85 100644 --- a/LiteNetLib/LiteNetLib.csproj +++ b/LiteNetLib/LiteNetLib.csproj @@ -45,13 +45,6 @@ net5.0;net6.0;net7.0;net8.0;netstandard2.0;netstandard2.1;net471 - - - - - - - True diff --git a/LiteNetLibSampleUnity/Assets/LiteNetLib.dll b/LiteNetLibSampleUnity/Assets/LiteNetLib.dll deleted file mode 100644 index e50b3b6d..00000000 Binary files a/LiteNetLibSampleUnity/Assets/LiteNetLib.dll and /dev/null differ diff --git a/LiteNetLibSampleUnity/Assets/LiteNetLib.dll.meta b/LiteNetLibSampleUnity/Assets/LiteNetLib.dll.meta deleted file mode 100644 index 8da128bb..00000000 --- a/LiteNetLibSampleUnity/Assets/LiteNetLib.dll.meta +++ /dev/null @@ -1,32 +0,0 @@ -fileFormatVersion: 2 -guid: c132af3a96c6a4049b6b3b3b044dacb0 -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: [] - isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - platformData: - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/LiteNetLibSampleUnity/Assets/LiteNetLib.pdb.meta b/LiteNetLibSampleUnity/Assets/LiteNetLib.pdb.meta deleted file mode 100644 index c632ac23..00000000 --- a/LiteNetLibSampleUnity/Assets/LiteNetLib.pdb.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8d4c429e3f74b074299de2753ca8de73 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/LiteNetLibSampleUnity/Assets/LiteNetLib.xml b/LiteNetLibSampleUnity/Assets/LiteNetLib.xml deleted file mode 100644 index 07d43a22..00000000 --- a/LiteNetLibSampleUnity/Assets/LiteNetLib.xml +++ /dev/null @@ -1,1514 +0,0 @@ - - - - LiteNetLib - - - - - Accept connection and get new NetPeer as result - - Connected NetPeer - - - - Type of message that you receive in OnNetworkReceiveUnconnected event - - - - - Disconnect reason that you receive in OnPeerDisconnected event - - - - - Additional information about disconnection - - - - - Additional info why peer disconnected - - - - - Error code (if reason is SocketSendError or SocketReceiveError) - - - - - Additional data that can be accessed (only if reason is RemoteConnectionClose) - - - - - New remote peer connected to host, or client connected to remote host - - Connected peer object - - - - Peer disconnected - - disconnected peer - additional info about reason, errorCode or data received with disconnect message - - - - Network error (on send or receive) - - From endPoint (can be null) - Socket error - - - - Received some data - - From peer - DataReader containing all received data - Number of channel at which packet arrived - Type of received packet - - - - Received unconnected message - - From address (IP and Port) - Message data - Message type (simple, discovery request or response) - - - - Latency information updated - - Peer with updated latency - latency value in milliseconds - - - - On peer connection requested - - Request information (EndPoint, internal id, additional data) - - - - On reliable message delivered - - - - - - - Ntp response - - - - - - Called when peer address changed (when AllowPeerAddressChange is enabled) - - Peer that changed address (with new address) - previous IP - - - - Module for UDP NAT Hole punching operations. Can be accessed from NetManager - - - - - Events automatically will be called without PollEvents method from another thread - - - - - Sending method type - - - - - Unreliable. Packets can be dropped, can be duplicated, can arrive without order. - - - - - Reliable. Packets won't be dropped, won't be duplicated, can arrive without order. - - - - - Unreliable. Packets can be dropped, won't be duplicated, will arrive in order. - - - - - Reliable and ordered. Packets won't be dropped, won't be duplicated, will arrive in order. - - - - - Reliable only last packet. Packets can be dropped (except the last one), won't be duplicated, will arrive in order. - Cannot be fragmented - - - - - Network constants. Can be tuned from sources for your purposes. - - - - - Interface to implement for your own logger - - - - - Static class for defining your own LiteNetLib logger instead of Console.WriteLine - or Debug.Log if compiled with UNITY flag - - - - - Main class for all network operations. Can be used as client and/or server. - - - - - Used with and to tag packets that - need to be dropped. Only relevant when DEBUG is defined. - - - - - Enable messages receiving without connection. (with SendUnconnectedMessage method) - - - - - Enable nat punch messages - - - - - 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 - - - - - Interval for latency detection and checking connection (in milliseconds) - - - - - 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) - - - - - Simulate packet loss by dropping random amount of packets. (Works only in DEBUG mode) - - - - - Simulate latency by holding packets for random time. (Works only in DEBUG mode) - - - - - Chance of packet loss when simulation enabled. value in percents (1 - 100). - - - - - Minimum simulated latency (in milliseconds) - - - - - Maximum simulated latency (in milliseconds) - - - - - Events automatically will be called without PollEvents method from another thread - - - - - If true - receive event will be called from "receive" thread immediately otherwise on PollEvents call - - - - - If true - delivery event will be called from "receive" thread immediately otherwise on PollEvents call - - - - - Allows receive broadcast packets - - - - - Delay between initial connection attempts (in milliseconds) - - - - - Maximum connection attempts before client stops and call disconnect event. - - - - - Enables socket option "ReuseAddress" for specific purposes - - - - - 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. - - - - - Statistics of all connections - - - - - Toggles the collection of network statistics for the instance and all known peers - - - - - NatPunchModule for NAT hole punching operations - - - - - Returns true if socket listening and update thread is running - - - - - Local EndPoint (host and port) - - - - - Automatically recycle NetPacketReader after OnReceive event - - - - - IPv6 support - - - - - Override MTU for all new peers registered in this NetManager, will ignores MTU Discovery! - - - - - Automatically discovery mtu starting from. Use at own risk because some routers can break MTU detection - and connection in result - - - - - First peer. Useful for Client mode - - - - - Experimental feature mostly for servers. Only for Windows/Linux - use direct socket calls for send/receive to drastically increase speed and reduce GC pressure - - - - - Disconnect peers if HostUnreachable or NetworkUnreachable spawned (old behaviour 0.9.x was true) - - - - - Allows peer change it's ip (lte to wifi, wifi to lte, etc). Use only on server - - - - - QoS channel count per message type (value must be between 1 and 64 channels) - - - - - Returns connected peers list (with internal cached list) - - - - - Returns connected peers count - - - - - NetManager constructor - - Network events listener (also can implement IDeliveryEventListener) - Extra processing of packages, like CRC checksum or encryption. All connected NetManagers must have same layer. - - - - Update and send logic. Use this only when NetManager started in manual mode - - elapsed milliseconds since last update call - - - - Send data to all connected peers (channel - 0) - - DataWriter with data - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers (channel - 0) - - Data - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers (channel - 0) - - Data - Start of data - Length of data - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers - - DataWriter with data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers - - Data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers - - Data - Start of data - Length of data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - - - - Send data to all connected peers (channel - 0) - - DataWriter with data - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Send data to all connected peers (channel - 0) - - Data - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Send data to all connected peers (channel - 0) - - Data - Start of data - Length of data - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Send data to all connected peers - - DataWriter with data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Send data to all connected peers - - Data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Send data to all connected peers - - Data - Start of data - Length of data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - Excluded peer - - - - Start logic thread and listening on available port - - - - - Start logic thread and listening on selected port - - bind to specific ipv4 address - bind to specific ipv6 address - port to listen - - - - Start logic thread and listening on selected port - - bind to specific ipv4 address - bind to specific ipv6 address - port to listen - - - - Start logic thread and listening on selected port - - port to listen - - - - Start in manual mode and listening on selected port - In this mode you should use ManualReceive (without PollEvents) for receive packets - and ManualUpdate(...) for update and send packets - This mode useful mostly for single-threaded servers - - bind to specific ipv4 address - bind to specific ipv6 address - port to listen - - - - Start in manual mode and listening on selected port - In this mode you should use ManualReceive (without PollEvents) for receive packets - and ManualUpdate(...) for update and send packets - This mode useful mostly for single-threaded servers - - bind to specific ipv4 address - bind to specific ipv6 address - port to listen - - - - Start in manual mode and listening on selected port - In this mode you should use ManualReceive (without PollEvents) for receive packets - and ManualUpdate(...) for update and send packets - This mode useful mostly for single-threaded servers - - port to listen - - - - Send message without connection - - Raw data - Packet destination - Operation result - - - - Send message without connection. WARNING This method allocates a new IPEndPoint object and - synchronously makes a DNS request. If you're calling this method every frame it will be - much faster to just cache the IPEndPoint. - - Data serializer - Packet destination IP or hostname - Packet destination port - Operation result - - - - Send message without connection - - Data serializer - Packet destination - Operation result - - - - Send message without connection - - Raw data - data start - data length - Packet destination - Operation result - - - - Triggers update and send logic immediately (works asynchronously) - - - - - Receive "maxProcessedEvents" pending events. Call this in game update code - In Manual mode it will call also socket Receive (which can be slow) - 0 - receive all events - - Max events that will be processed (called INetEventListener Connect/Receive/Etc), 0 - receive all events - - - - Connect to remote host - - Server IP or hostname - Server Port - Connection key - New NetPeer if new connection, Old NetPeer if already connected, null peer if there is ConnectionRequest awaiting - Manager is not running. Call - - - - Connect to remote host - - Server IP or hostname - Server Port - Additional data for remote peer - New NetPeer if new connection, Old NetPeer if already connected, null peer if there is ConnectionRequest awaiting - Manager is not running. Call - - - - Connect to remote host - - Server end point (ip and port) - Connection key - New NetPeer if new connection, Old NetPeer if already connected, null peer if there is ConnectionRequest awaiting - Manager is not running. Call - - - - Connect to remote host - - Server end point (ip and port) - Additional data for remote peer - New NetPeer if new connection, Old NetPeer if already connected, null peer if there is ConnectionRequest awaiting - Manager is not running. Call - - - - Force closes connection and stop all threads. - - - - - Force closes connection and stop all threads. - - Send disconnect messages - - - - Return peers count with connection state - - peer connection state (you can use as bit flags) - peers count - - - - Get copy of peers (without allocations) - - List that will contain result - State of peers - - - - Disconnect all peers without any additional data - - - - - Disconnect all peers with shutdown message - - Data to send (must be less or equal MTU) - Data start - Data count - - - - Immediately disconnect peer from server without additional data - - peer to disconnect - - - - Disconnect peer from server - - peer to disconnect - - - - Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) - - peer to disconnect - additional data - - - - Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) - - peer to disconnect - additional data - - - - Disconnect peer from server and send additional data (Size must be less or equal MTU - 8) - - peer to disconnect - additional data - data start - data length - - - - Create the requests for NTP server - - NTP Server address. - - - - Create the requests for NTP server - - NTP Server address. - port - - - - Create the requests for NTP server (default port) - - NTP Server address. - - - - Gets peer by peer id - - id of peer - Peer if peer with id exist, otherwise null - - - - Gets peer by peer id - - id of peer - resulting peer - True if peer with id exist, otherwise false - - - - Maximum packet pool size (increase if you have tons of packets sending) - - - - - Start logic thread and listening on selected port - - bind to specific ipv4 address - bind to specific ipv6 address - port to listen - mode of library - - - - Peer connection state - - - - - Network peer. Main purpose is sending messages to specific peer. - - - - - Peer parent NetManager - - - - - Current connection state - - - - - Connection time for internal purposes - - - - - Peer id can be used as key in your dictionary of peers - - - - - Id assigned from server - - - - - Current one-way ping (RTT/2) in milliseconds - - - - - Round trip time in milliseconds - - - - - Current MTU - Maximum Transfer Unit ( maximum udp packet size without fragmentation ) - - - - - Delta with remote time in ticks (not accurate) - positive - remote time > our time - - - - - Remote UTC time (not accurate) - - - - - Time since last packet received (including internal library packets) in milliseconds - - - - - Application defined object containing data about the connection - - - - - Statistics of peer connection - - - - - IPEndPoint serialize - - SocketAddress - - - - Returns packets count in queue for reliable channel - - number of channel 0-63 - type of channel ReliableOrdered or ReliableUnordered - packets count in channel queue - - - - Create temporary packet (maximum size MTU - headerSize) to send later without additional copies - - Delivery method (reliable, unreliable, etc.) - Number of channel (from 0 to channelsCount - 1) - PooledPacket that you can use to write data starting from UserDataOffset - - - - Sends pooled packet without data copy - - packet to send - size of user data you want to send - - - - Gets maximum size of packet that will be not fragmented. - - Type of packet that you want send - size in bytes - - - - Send data to peer with delivery event called - - Data - Number of channel (from 0 to channelsCount - 1) - Delivery method (reliable, unreliable, etc.) - User data that will be received in DeliveryEvent - - If you trying to send unreliable packet type - - - - - Send data to peer with delivery event called - - Data - Start of data - Length of data - Number of channel (from 0 to channelsCount - 1) - Delivery method (reliable, unreliable, etc.) - User data that will be received in DeliveryEvent - - If you trying to send unreliable packet type - - - - - Send data to peer with delivery event called - - Data - Number of channel (from 0 to channelsCount - 1) - Delivery method (reliable, unreliable, etc.) - User data that will be received in DeliveryEvent - - If you trying to send unreliable packet type - - - - - Send data to peer (channel - 0) - - Data - Send options (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Send data to peer (channel - 0) - - DataWriter with data - Send options (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Send data to peer (channel - 0) - - Data - Start of data - Length of data - Send options (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Send data to peer - - Data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Send data to peer - - DataWriter with data - Number of channel (from 0 to channelsCount - 1) - Send options (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Send data to peer - - Data - Start of data - Length of data - Number of channel (from 0 to channelsCount - 1) - Delivery method (reliable, unreliable, etc.) - - If size exceeds maximum limit: - MTU - headerSize bytes for Unreliable - Fragment count exceeded ushort.MaxValue - - - - - Address type that you want to receive from NetUtils.GetLocalIp method - - - - - Some specific network utilities - - - - - Get all local ip addresses - - type of address (IPv4, IPv6 or both) - List with all local ip addresses - - - - Get all local ip addresses (non alloc version) - - result list - type of address (IPv4, IPv6 or both) - - - - Get first detected local ip address - - type of address (IPv4, IPv6 or both) - IP address if available. Else - string.Empty - - - - Maximum data size that you can put into such packet - - - - - Offset for user data when writing to Data array - - - - - Raw packet data. Do not modify header! Use UserDataOffset as start point for your data - - - - - Compute CRC32C for data - - input data - offset - length - CRC32C checksum - - - - Note that "maxStringLength" only limits the number of characters in a string, not its size in bytes. - Strings that exceed this parameter are returned as empty - - - - - Note that "maxLength" only limits the number of characters in a string, not its size in bytes. - - "string.Empty" if value > "maxLength" - - - - Note that "maxLength" only limits the number of characters in a string, not its size in bytes. - - - - - Creates NetDataWriter from existing ByteArray - - Source byte array - Copy array to new location or use existing - - - - Creates NetDataWriter from existing ByteArray (always copied data) - - Source byte array - Offset of array - Length of array - - - - Sets position of NetDataWriter to rewrite previous values - - new byte position - previous position of data writer - - - - Note that "maxLength" only limits the number of characters in a string, not its size in bytes. - - - - - Register nested property type - - INetSerializable structure - - - - Register nested property type - - - - - - - Register nested property type - - INetSerializable class - - - - Reads all available data from NetDataReader and calls OnReceive delegates - - NetDataReader with packets data - - - - Reads all available data from NetDataReader and calls OnReceive delegates - - NetDataReader with packets data - Argument that passed to OnReceivedEvent - Malformed packet - - - - Reads one packet from NetDataReader and calls OnReceive delegate - - NetDataReader with packet - Malformed packet - - - - Reads one packet from NetDataReader and calls OnReceive delegate - - NetDataReader with packet - Argument that passed to OnReceivedEvent - Malformed packet - - - - Register and subscribe to packet receive event - - event that will be called when packet deserialized with ReadPacket method - Method that constructs packet instead of slow Activator.CreateInstance - 's fields are not supported, or it has no fields - - - - Register and subscribe to packet receive event (with userData) - - event that will be called when packet deserialized with ReadPacket method - Method that constructs packet instead of slow Activator.CreateInstance - 's fields are not supported, or it has no fields - - - - Register and subscribe to packet receive event - This method will overwrite last received packet class on receive (less garbage) - - event that will be called when packet deserialized with ReadPacket method - 's fields are not supported, or it has no fields - - - - Register and subscribe to packet receive event - This method will overwrite last received packet class on receive (less garbage) - - event that will be called when packet deserialized with ReadPacket method - 's fields are not supported, or it has no fields - - - - Remove any subscriptions by type - - Packet type - true if remove is success - - - - Register custom property type - - INetSerializable structure - - - - Register custom property type - - INetSerializable class - - - - Register custom property type - - Any packet - custom type writer - custom type reader - - - 's fields are not supported, or it has no fields - - - - Reads packet with known type - - NetDataReader with packet - Returns packet if packet in reader is matched type - 's fields are not supported, or it has no fields - - - - Reads packet with known type (non alloc variant) - - NetDataReader with packet - Deserialization target - Returns true if packet in reader is matched type - 's fields are not supported, or it has no fields - - - - Serialize object to NetDataWriter (fast) - - Serialization target NetDataWriter - Object to serialize - 's fields are not supported, or it has no fields - - - - Serialize object to byte array - - Object to serialize - byte array with serialized data - - - - Represents RFC4330 SNTP packet used for communication to and from a network time server. - - - - Most applications should just use the property. - - - The same data structure represents both request and reply packets. - Request and reply differ in which properties are set and to what values. - - - The only real property is . - All other properties read from and write to the underlying byte array - with the exception of , - which is not part of the packet on network and it is instead set locally after receiving the packet. - - - Copied from GuerrillaNtp project - with permission from Robert Vazan (@robertvazan) under MIT license, see https://github.com/RevenantX/LiteNetLib/pull/236 - - - - - - Gets RFC4330-encoded SNTP packet. - - - Byte array containing RFC4330-encoded SNTP packet. It is at least 48 bytes long. - - - This is the only real property. All other properties except - read from or write to this byte array. - - - - - Gets the leap second indicator. - - - Leap second warning, if any. Special value - indicates unsynchronized server clock. - Default is . - - - Only servers fill in this property. Clients can consult this property for possible leap second warning. - - - - - Gets or sets protocol version number. - - - SNTP protocol version. Default is 4, which is the latest version at the time of this writing. - - - In request packets, clients should leave this property at default value 4. - Servers usually reply with the same protocol version. - - - - - Gets or sets SNTP packet mode, i.e. whether this is client or server packet. - - - SNTP packet mode. Default is in newly created packets. - Server reply should have this property set to . - - - - - Gets server's distance from the reference clock. - - - - Distance from the reference clock. This property is set only in server reply packets. - Servers connected directly to reference clock hardware set this property to 1. - Statum number is incremented by 1 on every hop down the NTP server hierarchy. - - - Special value 0 indicates that this packet is a Kiss-o'-Death message - with kiss code stored in . - - - - - - Gets server's preferred polling interval. - - - Polling interval in log2 seconds, e.g. 4 stands for 16s and 17 means 131,072s. - - - - - Gets the precision of server clock. - - - Clock precision in log2 seconds, e.g. -20 for microsecond precision. - - - - - Gets the total round-trip delay from the server to the reference clock. - - - Round-trip delay to the reference clock. Normally a positive value smaller than one second. - - - - - Gets the estimated error in time reported by the server. - - - Estimated error in time reported by the server. Normally a positive value smaller than one second. - - - - - Gets the ID of the time source used by the server or Kiss-o'-Death code sent by the server. - - - - ID of server's time source or Kiss-o'-Death code. - Purpose of this property depends on value of property. - - - Stratum 1 servers write here one of several special values that describe the kind of hardware clock they use. - - - Stratum 2 and lower servers set this property to IPv4 address of their upstream server. - If upstream server has IPv6 address, the address is hashed, because it doesn't fit in this property. - - - When server sets to special value 0, - this property contains so called kiss code that instructs the client to stop querying the server. - - - - - - Gets or sets the time when the server clock was last set or corrected. - - - Time when the server clock was last set or corrected or null when not specified. - - - This Property is usually set only by servers. It usually lags server's current time by several minutes, - so don't use this property for time synchronization. - - - - - Gets or sets the time when the client sent its request. - - - This property is null in request packets. - In reply packets, it is the time when the client sent its request. - Servers copy this value from - that they find in received request packet. - - - - - - - Gets or sets the time when the request was received by the server. - - - This property is null in request packets. - In reply packets, it is the time when the server received client request. - - - - - - - Gets or sets the time when the packet was sent. - - - Time when the packet was sent. It should never be null. - Default value is . - - - This property must be set by both clients and servers. - - - - - - - Gets or sets the time of reception of response SNTP packet on the client. - - - Time of reception of response SNTP packet on the client. It is null in request packets. - - - This property is not part of the protocol and has to be set when reply packet is received. - - - - - - - Gets the round-trip time to the server. - - - Time the request spent traveling to the server plus the time the reply spent traveling back. - This is calculated from timestamps in the packet as (t1 - t0) + (t3 - t2) - where t0 is , - t1 is , - t2 is , - and t3 is . - This property throws an exception in request packets. - - - - - Gets the offset that should be added to local time to synchronize it with server time. - - - Time difference between server and client. It should be added to local time to get server time. - It is calculated from timestamps in the packet as 0.5 * ((t1 - t0) - (t3 - t2)) - where t0 is , - t1 is , - t2 is , - and t3 is . - This property throws an exception in request packets. - - - - - Initializes default request packet. - - - Properties and - are set appropriately for request packet. Property - is set to . - - - - - Initializes packet from received data. - - - - - Initializes packet from data received from a server. - - Data received from the server. - Utc time of reception of response SNTP packet on the client. - - - - - Represents leap second warning from the server that instructs the client to add or remove leap second. - - - - - - No leap second warning. No action required. - - - - - Warns the client that the last minute of the current day has 61 seconds. - - - - - Warns the client that the last minute of the current day has 59 seconds. - - - - - Special value indicating that the server clock is unsynchronized and the returned time is unreliable. - - - - - Describes SNTP packet mode, i.e. client or server. - - - - - - Identifies client-to-server SNTP packet. - - - - - Identifies server-to-client SNTP packet. - - - - - PreserveAttribute prevents byte code stripping from removing a class, method, field, or property. - - - - diff --git a/LiteNetLibSampleUnity/Assets/LiteNetLib.xml.meta b/LiteNetLibSampleUnity/Assets/LiteNetLib.xml.meta deleted file mode 100644 index 30ffaeba..00000000 --- a/LiteNetLibSampleUnity/Assets/LiteNetLib.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 46009b99ce8ce4b4b9de461f4fc5cec2 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/LiteNetLibSampleUnity/ProjectSettings/PackageManagerSettings.asset b/LiteNetLibSampleUnity/ProjectSettings/PackageManagerSettings.asset index 89ffc0e9..d5a8583c 100644 --- a/LiteNetLibSampleUnity/ProjectSettings/PackageManagerSettings.asset +++ b/LiteNetLibSampleUnity/ProjectSettings/PackageManagerSettings.asset @@ -26,11 +26,19 @@ MonoBehaviour: m_IsDefault: 1 m_Capabilities: 7 m_ConfigSource: 0 - m_UserSelectedRegistryName: + - m_Id: scoped:project:package.openupm.com + m_Name: package.openupm.com + m_Url: https://package.openupm.com + m_Scopes: + - com.revenantx.litenetlib + m_IsDefault: 0 + m_Capabilities: 0 + m_ConfigSource: 4 + m_UserSelectedRegistryName: package.openupm.com m_UserAddingNewScopedRegistry: 0 m_RegistryInfoDraft: m_Modified: 0 m_ErrorMessage: - m_UserModificationsInstanceId: -864 - m_OriginalInstanceId: -866 + m_UserModificationsInstanceId: -834 + m_OriginalInstanceId: -836 m_LoadAssets: 0 diff --git a/README.md b/README.md index 64a869bb..7c63b002 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Lite reliable UDP library for .NET Standard 2.0 (Mono, .NET Core, .NET Framework ## Unity notes!!! * Minimal supported Unity is 2018.3. For older Unity versions use [0.9.x library](https://github.com/RevenantX/LiteNetLib/tree/0.9) versions -* Always use library sources instead of precompiled DLL files ( because there are platform specific #ifdefs and workarounds for unity bugs ) +* Always use library sources or [OpenUPM package](https://openupm.com/packages/com.revenantx.litenetlib/) instead of precompiled DLL files ( because there are platform specific #ifdefs and workarounds for unity bugs ) ## Usage samples