private void StartPipe() { if (_closed) { return; } try { _remote.BeginReceive(remoteRecvBuffer, RecvSize, 0, new AsyncCallback(PipeRemoteReceiveCallback), null); _local.BeginReceive(connetionRecvBuffer, RecvSize, 0, new AsyncCallback(PipeConnectionReceiveCallback), null); _local.Send(connetionRecvBuffer, 0, 0); } catch (Exception e) { Logging.LogUsefulException(e); Close(); } }
private void StartPipe() { if (_closed) { return; } try { Server.GetForwardServerRef().GetConnections().AddRef(this); _remote.BeginReceive(remoteRecvBuffer, RecvSize, 0, new AsyncCallback(PipeRemoteReceiveCallback), null); _local.BeginReceive(connetionRecvBuffer, RecvSize, 0, new AsyncCallback(PipeConnectionReceiveCallback), null); _local.Send(connetionRecvBuffer, 0, 0); ResetTimeout(TTL); } catch (Exception e) { Logging.LogUsefulException(e); Close(); } }