コード例 #1
0
ファイル: RunConfig.cs プロジェクト: hivie7510/csharptest-net
		private TcpServer MakeListener(string ip, int port, TunnelListenerBase config)
		{
			TcpServer server = null;
			if (String.IsNullOrEmpty(config.ServerCertificate))
				server = new TcpServer(ip, port);
			else
			{
				X509Certificate cert = new X509Certificate(config.ServerCertificate, config.ServerCertPassword);
				server = new SslServer(ip, port, cert, config.AllowedClients);
			}
			return server;
		}
コード例 #2
0
        /// <summary>
        /// Forwards this server to the supplied target
        /// </summary>
		public TcpRedirector(TcpServer server, TcpClient target)
			: base(server)
		{
			_target = target;
		}
 /// <summary>
 /// Adds another server to forward connections for
 /// </summary>
 protected void AddServer(TcpServer server)
 {
     _servers.Add(server);
     server.Connected += server_Connected;
 }
 /// <summary>
 /// Constructs the instance with a server
 /// </summary>
 public TcpForwardingBase(TcpServer server)
     : this()
 {
     AddServer(server);
 }
コード例 #5
0
 public TcpDemultiplexer(TcpServer server)
     : base(server)
 {
     _targets = new Dictionary <int, TcpClient>();
 }
コード例 #6
0
 /// <summary>
 /// Forwards this server to the supplied target
 /// </summary>
 public TcpRedirector(TcpServer server, TcpClient target)
     : base(server)
 {
     _target = target;
 }
コード例 #7
0
        /// <summary>
        /// Adds another server to forward connections for
        /// </summary>
		protected void AddServer(TcpServer server)
		{
			_servers.Add(server);
			server.Connected += server_Connected;
		}
コード例 #8
0
		public TcpDemultiplexer(TcpServer server)
			: base(server)
		{
			_targets = new Dictionary<int, TcpClient>();
		}
コード例 #9
0
        /// <summary>
        /// Constructs the instance with a server
        /// </summary>
		public TcpForwardingBase(TcpServer server)
			: this()
		{
			AddServer(server);
		}
コード例 #10
0
ファイル: TcpServer.cs プロジェクト: hivie7510/csharptest-net
            internal ConnectedEventArgs(TcpServer server, System.Net.Sockets.TcpClient client, Stream stream)
			{
				_server = server;
				_client = client;
				_stream = stream;
			}
コード例 #11
0
 public void Add(TcpServer server)
 {
     base.AddServer(server);
 }
コード例 #12
0
ファイル: TcpServer.cs プロジェクト: radiaku/csharptest-net
 internal ConnectedEventArgs(TcpServer server, System.Net.Sockets.TcpClient client, Stream stream)
 {
     _server = server;
     _client = client;
     _stream = stream;
 }
コード例 #13
0
		public void Add(TcpServer server) { base.AddServer(server); }