Package opensmtpd implements OpenSMTPD-extras in Go https://godoc.org/pkg/maze.io/x/opensmtpd
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.

conn.go 198B

123456789101112
  1. package opensmtpd
  2. import (
  3. "net"
  4. "os"
  5. )
  6. // newConn wraps a file descriptor to a net.FileConn
  7. func newConn(fd int) (net.Conn, error) {
  8. f := os.NewFile(uintptr(fd), "")
  9. return net.FileConn(f)
  10. }