示例#1
0
 public Endpoint(ILoggerFactory loggerFactory, Identity identity)
 {
     this._connected = new List<EndpointProxy>();
     this._log = loggerFactory.Create(this);
     this.Identity = identity;
     this.ChannelSelector = new ClientChannelSharedSelector(loggerFactory);
     this._handler = new EndpointHandler(loggerFactory);
     this._handler.MessageHandler = ctx => OnMessage(this, ctx);
     this._handler.AckMessageHandler = (m, i) => OnAckMessage(this, new AckMessageArgs(m, i));
 }
示例#2
0
 public EndpointContext(ChannelContext channelContext
     , EndpointHandler handler
     , Identity messageFrom
     , int flag
     , string token)
 {
     this._channelContext = channelContext;
     this._handler = handler;
     this.MessageFrom = messageFrom;
     this._flag = flag;
     this._token = token;
 }
示例#3
0
 public EndpointProxy(EndpointHandler handler)
 {
     this._senders = new List<IChannelSender>();
     this._random = new Random();
     this._handler = handler;
 }