You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-18 08:06:33 +09:00
initializing network (including binding to socket) moved out from network thread, enabling catching of exceptions
ConnectionReset on reading handled properly (by disconnecting) when only one connection readonly added to various members
This commit is contained in:
@@ -140,14 +140,16 @@ namespace Lidgren.Network
|
||||
|
||||
m_configuration.VerifyAndLock();
|
||||
|
||||
InitializeNetwork();
|
||||
|
||||
// start network thread
|
||||
m_networkThread = new Thread(new ThreadStart(Run));
|
||||
m_networkThread = new Thread(new ThreadStart(NetworkLoop));
|
||||
m_networkThread.Name = "Lidgren network thread";
|
||||
m_networkThread.IsBackground = true;
|
||||
m_networkThread.Start();
|
||||
|
||||
// allow some time for network thread to start up in case they call Connect() immediately
|
||||
Thread.Sleep(3);
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user