public void Start(byte[] firstPacket, int length, Socket socket, int targetPort) { this._firstPacket = firstPacket; this._firstPacketLength = length; this._local = socket; try { EndPoint remoteEP = SocketUtil.GetEndPoint("127.0.0.1", targetPort); // Connect to the remote endpoint. _remote = new WrappedSocket(); _remote.BeginConnect(remoteEP, ConnectCallback, null); } catch (Exception e) { Logging.LogUsefulException(e); this.Close(); } }