Ejemplo n.º 1
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public PbConnection()
        {
            // KeepAliveIntervalプロパティを設定する前にnewします。
            this.keepAliveTimer = new Timer(OnKeepAliveCallback);

            InitReceivedPacket();
            ProtocolVersion       = new PbProtocolVersion();
            DefaultRequestTimeout = TimeSpan.MaxValue;
            KeepAliveInterval     = TimeSpan.FromMinutes(10);

            AddRequestHandler <PbCheckProtocolVersionRequest,
                               PbCheckProtocolVersionResponse>(
                HandleCheckProtocolVersionRequest);
            AddRequestHandler <PbKeepAliveRequest,
                               PbKeepAliveResponse>(
                HandleKeepAliveRequest);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// コンストラクタ
 /// </summary>
 public PbCheckProtocolVersionRequest(PbProtocolVersion version)
 {
     ProtocolVersion = version;
 }