You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

net_nonlinux.go 326B

123456789101112131415
  1. //go:build !linux
  2. // +build !linux
  3. package utils
  4. import (
  5. "fmt"
  6. "net"
  7. )
  8. // Output a description of a connection that can identify it to other systems
  9. // administration tools.
  10. func DescribeConn(conn net.Conn) (description string) {
  11. return fmt.Sprintf("%s <-> %s", conn.LocalAddr().String(), conn.RemoteAddr().String())
  12. }