public override IChannelListener <TChannel> BuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (!this.CanBuildChannelListener <TChannel>(context)) { throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Unsupported channel type: {0}.", typeof(TChannel).Name)); } UdpChannelListener channelListener = new UdpChannelListener(this, context); VirtualPathExtension virtualPathExtension = context.BindingParameters.Find <VirtualPathExtension>(); if (virtualPathExtension != null) { channelListener.SetVirtualPath(virtualPathExtension.VirtualPath); } return((IChannelListener <TChannel>)(object) channelListener); }
public void Dispatch(FramingData data) { UdpChannelListener channelListener = channelListeners.Lookup(data.To); channelListener.OnRawMessageReceived(data.Payload); }
public static UdpTransportManager LookUp(UdpChannelListener channelListener) { return(transportManagers.Lookup(channelListener.Uri)); }
public void Register(UdpChannelListener channelListener) { channelListeners.Add(channelListener.Uri, channelListener); }
internal UdpInputChannel(UdpChannelListener listener) : base(listener) { this.encoder = listener.MessageEncoderFactory.Encoder; this.messageQueue = new InputQueue <Message>(); }