Ejemplo n.º 1
0
 public Forwarder(int listenPort, string forwardToHost, int forwardToPort)
 {
     _listenPort = listenPort;
     _forwardToHost = forwardToHost;
     _forwardToPort = forwardToPort;
     _listener = null;
     _rSock = null;
     _lSock = null;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Wreck everything(figuratively, it actually just resets the Forwarder)
 /// </summary>
 public void Disimboul()
 {
     _listener.Stop();
     _rSock.Close();
     _lSock.Close();
     _listenPort = -1;
     _forwardToHost = "";
     _forwardToPort = -1;
     _listener = null;
     _rSock = null;
     _lSock = null;
 }
Ejemplo n.º 3
0
 private void SetupSocks()
 {
     _rSock = new ShitSock();
     _lSock = new ShitSock();
     _rSock.onInput += new RawShitSock.dOnInput(_rSock_onInput);
     _lSock.onInput += new RawShitSock.dOnInput(_lSock_onInput);
     _rSock.onConnectionEvent += new RawShitSock.dConnectionEvent(_rSock_onConnectionEvent);
     _lSock.onConnectionEvent += new RawShitSock.dConnectionEvent(_lSock_onConnectionEvent);
 }