예제 #1
0
파일: Bus.cs 프로젝트: thomasraynal/busy
        public void Start()
        {
            Self = new Peer(PeerId, EndPoint);

            _directory.Configure(this);

            _transport = _container.GetInstance <ITransport>();
            _transport.Configure(PeerId, EndPoint);

            _transport.Start();

            _transport.MessageReceived += (transportMessage) =>
            {
                var message = ToMessage(transportMessage);
                var dispach = new MessageDispatch(message);
                _messageDispatcher.Dispatch(dispach);
            };

            PerformAutoSubscribe();

            Task.Delay(1000).Wait();
        }
예제 #2
0
 public void Configure(PeerId peerId, string environment)
 {
     PeerId      = peerId;
     Environment = environment;
     _transport.Configure(peerId, environment);
 }
예제 #3
0
 public void Configure(PeerId peerId, string environment)
 {
     _innerTransport.Configure(peerId, environment);
 }