예제 #1
0
        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", "");
        }
예제 #2
0
 public TcpForwarderSlim(Relay relay)
 {
     this.Relayer = relay;
 }
예제 #3
0
 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);
 }
예제 #4
0
 public State(Socket source, Socket destination, Relay relay)
 {
     SourceSocket = source;
     DestinationSocket = destination;
     Buffer = new byte[8192];
     Relayer = relay;
 }