private void AcceptCallback(IAsyncResult asyncResult) { if (!KeepGoing) return; Signal.Set(); var boundSocket = (Socket)asyncResult.AsyncState; var receivingSocket = boundSocket.EndAccept(asyncResult); var state = new TcpState(receivingSocket); state.BeginReceive(ReadCallback); }
private void AcceptCallback(IAsyncResult asyncResult) { if (!KeepGoing) { return; } signal.Set(); var boundSocket = (Socket)asyncResult.AsyncState; var receivingSocket = boundSocket.EndAccept(asyncResult); var state = new TcpState(receivingSocket); state.BeginReceive(ReadCallback); }