connection.go 247 B

123456789101112131415161718192021
  1. package internet
  2. import (
  3. "net"
  4. )
  5. type ConnectionHandler func(Connection)
  6. type Reusable interface {
  7. Reusable() bool
  8. SetReusable(reuse bool)
  9. }
  10. type Connection interface {
  11. net.Conn
  12. Reusable
  13. }
  14. type SysFd interface {
  15. SysFd() (int, error)
  16. }