/// <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); }
/// <summary> /// コンストラクタ /// </summary> public PbCheckProtocolVersionRequest(PbProtocolVersion version) { ProtocolVersion = version; }