Ejemplo n.º 1
0
 ///
 /// <param name="channel"> associated channel </param>
 /// <param name="protocolCode"> ProtocolCode </param>
 /// <param name="version"> protocol version </param>
 /// <param name="url"> associated url </param>
 public Connection(IChannel channel, ProtocolCode protocolCode, byte version, Url url) : this(channel, url)
 {
     this.protocolCode = protocolCode;
     this.version      = version;
     init();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="channel"> associated channel </param>
 /// <param name="protocolCode"> ProtocolCode </param>
 /// <param name="url"> associated url </param>
 public Connection(IChannel channel, ProtocolCode protocolCode, Url url) : this(channel, url)
 {
     this.protocolCode = protocolCode;
     init();
 }
 public static void registerProtocol(Protocol protocol, params byte[] protocolCodeBytes)
 {
     registerProtocol(protocol, ProtocolCode.fromBytes(protocolCodeBytes));
 }
 public static Protocol unRegisterProtocol(byte protocolCode)
 {
     protocols.TryRemove(ProtocolCode.fromBytes(protocolCode), out var protocol);
     return(protocol);
 }
 public static Protocol getProtocol(ProtocolCode protocolCode)
 {
     protocols.TryGetValue(protocolCode, out var protocol);
     return(protocol);
 }