1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Net;
- namespace Vinno.IUS.Common.Network.Channels
- {
- public interface IChannel
- {
- /// <summary>
- /// Gets the ChannelId for this Channel;
- /// </summary>
- int Id { get; }
- /// <summary>
- /// Gets the Remote host info, for Server, this property means client, for client, this property
- /// means server.
- /// </summary>
- IPEndPoint Remote { get; set; }
- /// <summary>
- /// Gets the Local host info, for Server, this property means server, for client, this property
- /// means client.
- /// </summary>
- IPEndPoint Local { get; set; }
- /// <summary>
- /// Raised when channel was closed.
- /// </summary>
- event EventHandler Closed;
- /// <summary>
- /// Update the channel's Id.
- /// </summary>
- /// <param name="channelId"></param>
- void UpdateChannelId(int channelId);
- /// <summary>
- /// Close the channel, and raise the event of close.
- /// </summary>
- void Close();
- }
- }
|