add heartbeat echo from server to client

This commit is contained in:
Hurricanezwf
2016-02-26 10:52:22 +08:00
parent b2ca78fa04
commit a2f1897ab4
4 changed files with 83 additions and 13 deletions

View File

@@ -15,6 +15,7 @@ var (
LogLevel string = "warn"
LogWay string = "file"
HeartBeatInterval int64 = 5
HeartBeatTimeout int64 = 30
)
var ProxyClients map[string]*ProxyClient = make(map[string]*ProxyClient)

View File

@@ -11,3 +11,13 @@ const (
CtlConn = iota
WorkConn
)
// msg from client to server
const (
CSHeartBeatReq = 1
)
// msg from server to client
const (
SCHeartBeatRes = 100
)