コード例 #1
0
ファイル: UdpMultiplexer.cs プロジェクト: pichiliani/CoMusic
 protected void Bind(UdpMultiplexer udpMux)
 {
     mux = udpMux;
     mux.SetPacketHandler(remote, ReceivedMessage);
 }
コード例 #2
0
 public override void Start()
 {
     if (Active) { return; }
     if (udpMultiplexer == null) { udpMultiplexer = new UdpMultiplexer(address, port); }
     udpMultiplexer.SetDefaultPacketHandler(PreviouslyUnseenUdpEndpoint);
     udpMultiplexer.Start();
 }
コード例 #3
0
ファイル: UdpMultiplexer.cs プロジェクト: pichiliani/CoMusic
 /// <summary>
 /// Create and configure a UDP handle for the specified demultiplexor.
 /// </summary>
 /// <param name="mux"></param>
 /// <param name="ep"></param>
 /// <returns></returns>
 public static UdpHandle Bind(UdpMultiplexer mux, EndPoint ep)
 {
     UdpHandle h = new UdpHandle(ep);
     h.Bind(mux);
     return h;
 }
コード例 #4
0
 public override void Dispose()
 {
     Stop();
     try { udpMultiplexer.Dispose(); }
     catch (Exception e) { log.Warn("exception disposing UDP listener", e); }
     udpMultiplexer = null;
 }