|
@@ -4,6 +4,7 @@ import (
|
|
|
"log"
|
|
|
"net"
|
|
|
"strings"
|
|
|
+ "sync"
|
|
|
"time"
|
|
|
|
|
|
"git.me9.top/git/tinymq/config"
|
|
@@ -22,6 +23,8 @@ type Line struct {
|
|
|
pingID uint16 // 只有客户端使用
|
|
|
pingWrongCount uint8 // 记录 ping id 反馈错误次数,超过3次则重新连接
|
|
|
|
|
|
+ Extra sync.Map // 附加信息,由应用端决定具体内容
|
|
|
+
|
|
|
// 当前连接的管道
|
|
|
sendRequest chan *RequestData // 发送请求数据
|
|
|
sendResponse chan *ResponseData // 发送回应包
|