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
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

scout_conn_collected.go 510B

1234567891011121314151617181920212223242526272829
  1. package doppel
  2. import "time"
  3. const (
  4. ScoutConnCollectedPreallocSize = 100
  5. )
  6. type ScoutConnResult struct {
  7. timestamp time.Time
  8. recordType byte
  9. }
  10. type ScoutConnCollected struct {
  11. data []ScoutConnResult
  12. }
  13. func (s *ScoutConnCollected) Add(record byte) {
  14. s.data = append(s.data, ScoutConnResult{
  15. timestamp: time.Now(),
  16. recordType: record,
  17. })
  18. }
  19. func NewScoutConnCollected() *ScoutConnCollected {
  20. return &ScoutConnCollected{
  21. data: make([]ScoutConnResult, 0, ScoutConnCollectedPreallocSize),
  22. }
  23. }