20 lines
353 B
Go
20 lines
353 B
Go
package service
|
|
|
|
import (
|
|
"net"
|
|
|
|
omd "git.loafle.net/overflow/model/discovery"
|
|
ounp "git.loafle.net/overflow/util-go/net/ping"
|
|
)
|
|
|
|
func connectionPingFunc(service *omd.Service, pingOption ounp.Option) (ttl int, err error) {
|
|
var conn net.Conn
|
|
conn, err = getConnection(service, pingOption)
|
|
if nil != err {
|
|
return
|
|
}
|
|
defer conn.Close()
|
|
|
|
return
|
|
}
|