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 308B

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