コード例 #1
0
        public ServerCommunication(TcpClient client)
        {
            id   = Guid.Empty;
            text = new TCPDuplexCommunication(client);
            text.MessageReceived += OnTextMessageReceived;
            text.StartListening();

            UdpClient udpClient = new UdpClient();

            udpClient.Connect("localhost", 13001);
            audio = new UDPDuplexCommunication(udpClient, (IPEndPoint)client.Client.RemoteEndPoint);

            audioDriver = new AudioDriver();
            audioDriver.StartRecording();
            audioDriver.DataAvailable += OnAudioDataAvailable;
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: jvitoroc/simple-chat
 public static void TCPDuplexCommunicationAccepted(TCPDuplexCommunication tcpClient)
 {
     clients.Add(new Client(tcpClient));
 }