MCPcopy
hub / github.com/aceld/zinx / makeDefaultMsg

Function makeDefaultMsg

znet/heartbeat.go:45–48  ·  view source on GitHub ↗
(conn ziface.IConnection)

Source from the content-addressed store, hash-verified

43}
44
45func makeDefaultMsg(conn ziface.IConnection) []byte {
46 msg := fmt.Sprintf("heartbeat [%s->%s]", conn.LocalAddr(), conn.RemoteAddr())
47 return []byte(msg)
48}
49
50func notAliveDefaultFunc(conn ziface.IConnection) {
51 zlog.Ins().InfoF("Remote connection %s is not alive, stop it", conn.RemoteAddr())

Callers

nothing calls this directly

Calls 2

LocalAddrMethod · 0.65
RemoteAddrMethod · 0.65

Tested by

no test coverage detected