示例#1
0
        public KpWebSocketClient(WebSocketConnectionConfig config)
        {
            #region contrat
            if (config == null)
            {
                throw new Exception("Config must be provided");
            }
            if (String.IsNullOrEmpty(config.EnpointUri))
            {
                throw new Exception("EnpointUri must be provided");
            }
            if (config.TimeOutConnectionSIB <= 0)
            {
                throw new Exception("TimeOutConnectionSIB must be greater than zero");
            }
            #endregion contract

            this.config = config;
        }
示例#2
0
 public void SetConnectionConfig(ConnectionConfig config)
 {
     this.config = (WebSocketConnectionConfig)config;
 }