private void waitConnect() { try { tcpListener.Start(); cmdClient = tcpListener.AcceptTcpClient(); NetworkStream networkStream = cmdClient.GetStream(); networkStream.ReadByte(); NS = networkStream; imgClient = tcpListener.AcceptTcpClient(); networkStream = imgClient.GetStream(); networkStream.ReadByte(); thumbServer = new ThumbServer(networkStream); tcpListener.Stop(); listenr = new Listener(NS, this); if (ThisAddIn.isFileOpen) { sendFileInfo(); } ThisAddIn.isClientOnline = true; } catch (Exception) { return; } }
private void waitConnect() { try { tcpListener.Start(); cmdClient = tcpListener.AcceptTcpClient(); NetworkStream networkStream = cmdClient.GetStream(); networkStream.ReadByte(); NS = networkStream; imgClient = tcpListener.AcceptTcpClient(); networkStream = imgClient.GetStream(); networkStream.ReadByte(); thumbServer = new ThumbServer(networkStream); tcpListener.Stop(); listenr = new Listener(NS, this); if (ThisAddIn.isFileOpen) { sendFileInfo(); } ThisAddIn.isClientOnline = true; } catch (Exception) { return; } }