Beispiel #1
0
        private void OnSocketOpened(DisquuunSocket source, string socketId)
        {
            if (connectionState != ConnectionState.OPENING)
            {
                return;
            }
            var availableSocketCount = socketPool.AvailableSocketNum();

            if (availableSocketCount == minConnectionCount)
            {
                connectionState = ConnectionState.OPENED;
                ConnectionOpened(connectionId);
            }
        }
Beispiel #2
0
 public int AvailableSocketNum()
 {
     return(socketPool.AvailableSocketNum());
 }