You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 22:56:30 +09:00
Added code to rebind socket after a NetConnected socket error; thanks Rhee
This commit is contained in:
@@ -16,7 +16,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||||
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#if !__ANDROID__ && !IOS && !UNITY_WEBPLAYER
|
||||
#if !__ANDROID__ && !IOS && !UNITY_WEBPLAYER && !UNITY_ANDROID && !UNITY_IPHONE
|
||||
#define IS_FULL_NET_AVAILABLE
|
||||
#endif
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace Lidgren.Network
|
||||
/// </summary>
|
||||
public static byte[] CreateSHA1Hash(string key)
|
||||
{
|
||||
using (var sha = SHA1.Create())
|
||||
using (var sha = new SHA1CryptoServiceProvider())
|
||||
return sha.ComputeHash(Encoding.UTF8.GetBytes(key));
|
||||
}
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace Lidgren.Network
|
||||
/// </summary>
|
||||
public static byte[] CreateSHA1Hash(byte[] data)
|
||||
{
|
||||
using (var sha = SHA1.Create())
|
||||
using (var sha = new SHA1CryptoServiceProvider())
|
||||
return sha.ComputeHash(data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user