From abfd401180d1eb09c8ed1c24797c3e503e45fa08 Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期日, 07 二月 2021 15:02:50 +0800 Subject: [PATCH] 调整超时为3s --- message.go | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) diff --git a/message.go b/message.go index 0f252a9..9ba85b9 100644 --- a/message.go +++ b/message.go @@ -4,7 +4,7 @@ PORT_DEFAULTPROXY int = 5000 KEY_REGISTER int = 101 //澶勭悊TOPIC_REGISTER / TOPIC_LEAVE鍜孴OPIC_UPDATETOPIC KEY_HEARTBEAT int = 102 //澶勭悊TOPIC_HEARTBEAT - KEY_QUERY int = 103 //澶勭悊TOPIC_QUERYKEY鍜孴OPIC_QUERYTOPIC + KEY_QUERY int = 103 //澶勭悊TOPIC_QUERYKEY鍜孴OPIC_QUERYTOPIC鍜孴OPIC_QUERYPROC ) const ( @@ -16,17 +16,18 @@ TOPIC_UPDATETOPIC string = "Topic_UpdateTopic" TOPIC_QUERYKEY string = "Topic_QueryKey" TOPIC_QUERYTOPIC string = "Topic_QueryTopic" + TOPIC_QUERYPROC string = "Topic_QueryProc" ) -const ( - REPLY_SUCCESS int = 200 - REPLY_FAILED int = 202 -) -type CommonReply struct { - Status int `json:"status"` // 璇锋眰鐘舵��,鐩墠鍙湁涓や釜,鎴愬姛杩斿洖200,澶辫触202 - Desc string `json:"desc"` // 璇锋眰鐘舵�佺殑鎻忚堪,鎴愬姛"success",澶辫触杩斿洖澶辫触鍘熷洜,濡傚績璺虫湇鍔℃湭鍚姩 - Body []byte `json:"body"` // 杩斿洖鍊肩殑鍏蜂綋鍐呭,鐢ㄦ埛绾﹀畾 -} +//const ( +// REPLY_SUCCESS int = 200 +// REPLY_FAILED int = 202 +//) +//type CommonReply struct { +// Status int `json:"status"` // 璇锋眰鐘舵��,鐩墠鍙湁涓や釜,鎴愬姛杩斿洖200,澶辫触202 +// Desc string `json:"desc"` // 璇锋眰鐘舵�佺殑鎻忚堪,鎴愬姛"success",澶辫触杩斿洖澶辫触鍘熷洜,濡傚績璺虫湇鍔℃湭鍚姩 +// Body []byte `json:"body"` // 杩斿洖鍊肩殑鍏蜂綋鍐呭,鐢ㄦ埛绾﹀畾 +//} const ( NODE_ALIVE int = 0 @@ -104,4 +105,14 @@ SvrInfo ServerInfo `json:"svrInfo"` //鑺傜偣鍩烘湰淇℃伅 Topic2Key map[string]int `json:"topic2Key"` //topic-replyKey鐨勫搴斿叧绯� Status int `json:"status"` //鑺傜偣鐘舵�� +} + + +//宸叉敞鍐岀殑Proc杩涚▼淇℃伅 +type RegisteredClient struct { + Info RegisterInfo `json:"info"` + ReplyKey int `json:"replyKey"` + HeartbeatCount int `json:"heartbeatCount"` + DeadCount int `json:"deadCount"` + Status int `json:"status"` } \ No newline at end of file -- Gitblit v1.8.0