Example #1
0
 public Client(INodeEndpointProtocolClient outerProtocol, ITranslatorProtocolHandlerFactory handlerFactory, TranslatorProtocolFactory factory)
     : base(factory)
 {
     this.clientHandler = handlerFactory.CreateClientHandler();
     SetOuterProtocol(outerProtocol);
     this.Handler = this.clientHandler;
     this.clientHandler.AttachClient(this);
 }
Example #2
0
 public Server(INodeEndpointProtocolServer outerProtocol, ITranslatorProtocolHandlerFactory handlerFactory, ServerListener serverListener)
     : base((TranslatorProtocolFactory)serverListener.Factory)
 {
     this.serverListener = serverListener;
     this.serverHandler  = handlerFactory.CreateServerHandler();
     SetOuterProtocol(outerProtocol);
     this.Handler = this.serverHandler;
     this.serverHandler.AttachServer(this);
 }
 public static INodeEndpointProtocolFactory With(this INodeEndpointProtocolFactory factory, ITranslatorProtocolHandlerFactory handlerFactory)
 {
     return(new TranslatorProtocolFactory(factory, handlerFactory));
 }
Example #4
0
 public TranslatorProtocolFactory(INodeEndpointProtocolFactory outerFactory, ITranslatorProtocolHandlerFactory handlerFactory)
 {
     this.OuterFactory   = outerFactory;
     this.HandlerFactory = handlerFactory;
 }
Example #5
0
 public ServerListener(INodeEndpointProtocolServerListener outerServerListener, ITranslatorProtocolHandlerFactory handlerFactory, TranslatorProtocolFactory factory)
 {
     this.factory             = factory;
     this.outerServerListener = outerServerListener;
     this.handlerFactory      = handlerFactory;
 }