private void _server_ClientConnected(object sender, TcpClientConnectedEventArgs e)
        {
            switch (_dataType)
            {
            case ChannelDataType.DataStream:
                _clientsInfo.Add(new ClientInformation()
                {
                    Client = e.TcpClient, Buffer = new CircularBuffer <byte>((int)_server.ReceiveBufferSize)
                });
                break;

            case ChannelDataType.String:
                _clientsInfo.Add(new ClientInformation()
                {
                    Client = e.TcpClient, Buffer = new StringBuffer((int)_server.ReceiveBufferSize)
                });
                break;

            default:
                break;
            }
            ClientConnected?.Invoke(e.TcpClient);
        }
Beispiel #2
0
 private void _server_ClientConnected(object sender, TcpClientConnectedEventArgs e)
 {
     _isClientConnect = true;
 }