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

events.go 422B

12345678910111213141516171819202122232425262728293031
  1. package mtglib
  2. import (
  3. "net"
  4. "time"
  5. )
  6. type EventStart struct {
  7. CreatedAt time.Time
  8. ConnID string
  9. RemoteIP net.IP
  10. }
  11. func (e EventStart) StreamID() string {
  12. return e.ConnID
  13. }
  14. type EventFinish struct {
  15. CreatedAt time.Time
  16. ConnID string
  17. }
  18. func (e EventFinish) StreamID() string {
  19. return e.ConnID
  20. }
  21. type EventConcurrencyLimited struct{}
  22. func (e EventConcurrencyLimited) StreamID() string {
  23. return ""
  24. }