Exemple #1
0
 /// <summary>
 /// Creates a new proxy between 2 targets.
 /// </summary>
 /// <param name="a">Point A.</param>
 /// <param name="b">Point B.</param>
 public Proxy(HostTarget a, HostTarget b)
 {
     A           = a;
     B           = b;
     ProxyServer = new ActiveEndPoint <T>(B);
     ProxyServer.SessionSpawned += ProxyServer_SessionSpawned;
 }
Exemple #2
0
 /// <summary>
 /// Creates a new end point router from common target to multiple remote targets.
 /// </summary>
 /// <param name="common">Common end.</param>
 /// <param name="targets">Remote targets.</param>
 public Router(HostTarget common, params HostTarget[] targets)
 {
     Common        = common;
     Targets       = targets;
     RoutingServer = new ActiveEndPoint <T>(Common)
     {
         Index = -1
     };
     RoutingServer.ExceptionThrown += AllTargets_ExceptionThrown;
     RoutingServer.SessionSpawned  += RoutingServer_SessionSpawned;
 }
Exemple #3
0
 /// <summary>
 /// Creates client or server instance for specified host target.
 /// </summary>
 /// <param name="host">Host target.</param>
 /// <param name="protocolType">TCP (default), or UDP (not tested).</param>
 public ActiveEndPoint(HostTarget host, ProtocolType protocolType = ProtocolType.Tcp) => Host = host;