public FormMain() { InitializeComponent(); Relay relay = new Relay("79.110.88.183", 27932, "127.0.0.1", 27932); relay.serverReceivedData += Relay_serverReceivedData; relay.clientReceivedData += Relay_clientReceivedData; File.WriteAllText(Path.GetTempPath() + "/outz.sf2", ""); File.WriteAllText(Path.GetTempPath() + "/inz.sf2", ""); }
public TcpForwarderSlim(Relay relay) { this.Relayer = relay; }
private void Connect(EndPoint remoteEndpoint, Socket destination, Relay relay) { var state = new State(MainSocket, destination, relay); MainSocket.Connect(remoteEndpoint); MainSocket.BeginReceive(state.Buffer, 0, state.Buffer.Length, SocketFlags.None, OnDestDataReceive, state); }
public State(Socket source, Socket destination, Relay relay) { SourceSocket = source; DestinationSocket = destination; Buffer = new byte[8192]; Relayer = relay; }