This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [MethodImpl(256)] | |
| public BitBuffer AddString(string value) { | |
| Debug.Assert(value != null, "String is null"); | |
| Debug.Assert(value.Length <= stringLengthMax, "String too long, raise the stringLengthMax value or split the string."); | |
| int length = value.Length; | |
| if (length > stringLengthMax) | |
| length = stringLengthMax; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #if NETSTACK_INLINING | |
| [MethodImpl(256)] | |
| #endif | |
| public BitBufferV2 AddString(string value) { | |
| if (value == null) | |
| throw new ArgumentNullException("value"); | |
| uint length = (uint)value.Length; | |
| if (length > stringLengthMax) | |
| length = stringLengthMax; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private volatile bool isRunning = true; | |
| private Thread serverThread; | |
| private void ServerThread() | |
| { | |
| enetHost = new Host(); | |
| enetAddress = new Address(); | |
| enetAddress.Port = enetPort; | |
| enetHost.Create(enetAddress, maxClients, 8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (c) 2019 Stanislav Denisov, Maxim Munnig Schmidt | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Simple Test Case to Send messages with ENet-Sharp & ENetStack | |
| // ------------------------------------------------------------- | |
| // steven 'lazalong' 2019 | |
| // | |
| // If all goes smoothly you should see the followign log line: | |
| // [Server] LogindData= OpCode= 4 passHash= 70 username= username | |
| // UnityEngine.Debug:Log(Object) | |
| // You will need the dll from the reference below. | |
| // Reference: |