Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

conns.go 497B

1234567891011121314151617181920212223242526
  1. package essentials
  2. import (
  3. "io"
  4. "net"
  5. )
  6. // CloseableReader is an [io.Reader] interface that can close its reading end.
  7. type CloseableReader interface {
  8. io.Reader
  9. CloseRead() error
  10. }
  11. // CloseableWriter is an [io.Writer] that can close its writing end.
  12. type CloseableWriter interface {
  13. io.Writer
  14. CloseWrite() error
  15. }
  16. // Conn is an extension of [net.Conn] that can close its ends. This mostly
  17. // implies TCP connections.
  18. type Conn interface {
  19. net.Conn
  20. CloseableReader
  21. CloseableWriter
  22. }