Ejemplo n.º 1
0
 public Publisher(string announceIp, int port)
 {
     this.AnnounceIp = announceIp;
     this.AnnouncePort = port;
     sendSocket = new UdpSource(announceIp, port);
     writer = new BatchWriter(sendSocket, 1024*128);
     publisher = new TopicPublisher(writer);
 }
Ejemplo n.º 2
0
        public UdpMulticastingChannel(string address, int port)
        {
            MessageParserFactory = new MessageParserFactory();
            MessageParser parser = MessageParserFactory.Create();
            UdpReceiver receiveSocket = new UdpReceiver(address, port);
            receiveSocket.ReceiveEvent += parser.OnBytes;
            receiveSocket.Start();

            var sendSocket = new UdpSource(address, port);
            sendSocket.Start();
            var asyncWriter = new DaemonWritter(sendSocket);
            //var asyncWriter = new BatchWriter(sendSocket,1500);
            TopicPublisher = new TopicPublisher(asyncWriter);
            TopicPublisher.Start();

            _disposables.Add(receiveSocket);
            _disposables.Add(sendSocket);
        }
Ejemplo n.º 3
0
 public DaemonWritter(UdpSource source)
 {
     _source = source;
 }