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.

copy_pool.go 219B

12345678910111213141516
  1. package proxy
  2. import "sync"
  3. const copyBufferSize = 30 * 1024
  4. var copyPool sync.Pool
  5. func init() {
  6. copyPool = sync.Pool{
  7. New: func() interface{} {
  8. data := make([]byte, copyBufferSize)
  9. return &data
  10. },
  11. }
  12. }