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); }
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); }
public DaemonWritter(UdpSource source) { _source = source; }