Files
natpass/code/client/conn/send.go
T
2022-01-21 18:45:39 +08:00

19 lines
313 B
Go

package conn
import (
"time"
"github.com/jkstack/natpass/code/network"
)
// SendKeepalive send keepalive message
func (conn *Conn) SendKeepalive() {
var msg network.Msg
msg.To = "server"
msg.XType = network.Msg_keepalive
select {
case conn.write <- &msg:
case <-time.After(conn.cfg.WriteTimeout):
}
}