Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Seems inefficient to create a new timer per connection, no?

t := time.NewTicker(pingPeriod)

Maybe if you hold all of the connections in one array and create one timer for the ping, things would be faster.

Curious how this compares to netty...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: