Example #1
0
 /// <summary>
 /// Creates a new channeled connection.
 /// </summary>
 /// <remarks>
 /// As channels acquire their identifier automatically, CreateChannel()
 /// must be called in the same sequence at all sites, as to ensure
 /// that local channels correspond to the correct remote channels.
 /// </remarks>
 /// <returns>The channeled connection.</returns>
 public IConnection CreateChannel()
 {
     int channelId = channels.Count;
     var channel = new TunneledConnection(this);
     channels[channelId] = channel;
     channelIds[channel] = channelId;
     return channel;
 }
Example #2
0
 internal void Send(TunneledConnection channel, object o)
 {
     int id = channelIds[channel];
     Connection.Send(new MultichannelMessage(id, o));
 }