選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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. }