Пример #1
0
 private void OnApplicationQuit()
 {
     if (m_Connection != null)
     {
         m_Connection.CloseConnection();
     }
 }
            public void HandleUDPReceiveError(object sender, IPEndPoint receiveEndPoint)
            {
                NetworkConnection deadConnection = null;

                foreach (NetworkConnection clientCon in ClientConnections.Values)
                {
                    if (clientCon.IsConnectedTo(receiveEndPoint.Port))
                    {
                        deadConnection = clientCon;
                        break;
                    }
                }

                if (deadConnection != null)
                {
                    deadConnection.CloseConnection();
                }
            }