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

12345678910111213141516171819202122232425262728
  1. package essentials
  2. import (
  3. "io"
  4. "net"
  5. )
  6. // CloseableReader is a reader interface that can close its reading end.
  7. type CloseableReader interface {
  8. io.Reader
  9. CloseRead() error
  10. }
  11. // CloseableWriter is a 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. }