File tree Expand file tree Collapse file tree 2 files changed +22
-14
lines changed
Expand file tree Collapse file tree 2 files changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ protected async Task<ArraySegment<byte>> ReadPackageAsync(CancellationToken toke
784784
785785 protected void BeginSendPackage ( CancellationToken cancellationToken )
786786 {
787- Task . Delay ( 10 , cancellationToken ) . ContinueWith ( async t =>
787+ Task . Delay ( options . CheckSendQueueInterval , cancellationToken ) . ContinueWith ( async t =>
788788 {
789789 if ( t . IsCanceled )
790790 return ;
Original file line number Diff line number Diff line change @@ -9,12 +9,33 @@ namespace Quick.Protocol
99{
1010 public abstract class QpChannelOptions
1111 {
12+ /// <summary>
13+ /// 内部是否压缩
14+ /// </summary>
15+ internal virtual bool InternalCompress { get ; set ; } = false ;
16+ /// <summary>
17+ /// 内部是否加密
18+ /// </summary>
19+ internal virtual bool InternalEncrypt { get ; set ; } = false ;
20+ /// <summary>
21+ /// 内部接收超时(默认15秒)
22+ /// </summary>
23+ internal int InternalTransportTimeout { get ; set ; } = 15 * 1000 ;
24+
1225 /// <summary>
1326 /// 心跳间隔,为发送或接收超时中小的值的三分一
1427 /// </summary>
1528 [ Category ( "高级" ) ]
1629 [ DisplayName ( "心跳间隔" ) ]
1730 public int HeartBeatInterval => InternalTransportTimeout / 3 ;
31+
32+ /// <summary>
33+ /// 检查发送队列间隔
34+ /// </summary>
35+ [ Category ( "高级" ) ]
36+ [ DisplayName ( "检查发送队列间隔" ) ]
37+ public int CheckSendQueueInterval => 100 ;
38+
1839 /// <summary>
1940 /// 密码
2041 /// </summary>
@@ -43,19 +64,6 @@ public QpInstruction[] InstructionSet
4364 }
4465 }
4566
46- /// <summary>
47- /// 内部是否压缩
48- /// </summary>
49- internal virtual bool InternalCompress { get ; set ; } = false ;
50- /// <summary>
51- /// 内部是否加密
52- /// </summary>
53- internal virtual bool InternalEncrypt { get ; set ; } = false ;
54- /// <summary>
55- /// 内部接收超时(默认15秒)
56- /// </summary>
57- internal int InternalTransportTimeout { get ; set ; } = 15 * 1000 ;
58-
5967 /// <summary>
6068 /// 最大包大小(默认为:10MB)
6169 /// </summary>
You can’t perform that action at this time.
0 commit comments