public interface IChannelReceiverHook
|
ChannelScheme | Read-only |
ChannelSinkChain | Read-only Gets the channel sink chain that the current channel is using. |
WantsToListen | Read-only Gets a Boolean value indicating whether IChannelReceiverHook needs to be hooked into the outside listener service. |
AddHookChannelUri | Adds a URI on which the channel hook will listen. |
string ChannelScheme {get;}
|
IServerChannelSink ChannelSinkChain {get;}
|
class CustomChannel : BaseChannelWithProperties, IChannelReceiverHook, IChannelReceiver, IChannel, IChannelSender { // TransportSink is a private class defined within CustomChannel. TransportSink transportSink; public IServerChannelSink ChannelSinkChain { get { return transportSink.NextChannelSink; } } // Rest of CustomChannel's implementation...
bool WantsToListen {get;}
|
void AddHookChannelUri( |
channelUri
class CustomChannel : BaseChannelWithProperties, IChannelReceiverHook, IChannelReceiver, IChannel, IChannelSender { public void AddHookChannelUri(string channelUri) { if (channelUri != null) { string [] uris = dataStore.ChannelUris; // This implementation only allows one URI to be hooked in. if (uris == null) { string [] newUris = new string[1]; newUris[0] = channelUri; dataStore.ChannelUris = newUris; wantsToListen = false; } else { string msg = "This channel is already listening for " + "data, and can't be hooked into at this stage."; throw new System.Runtime.Remoting.RemotingException(msg); } } } // The rest of CustomChannel's implementation.