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; }
public static void TCPDuplexCommunicationAccepted(TCPDuplexCommunication tcpClient) { clients.Add(new Client(tcpClient)); }