It makes direct [epoll](https://en.wikipedia.org/wiki/Epoll) and [kqueue](https://en.wikipedia.org/wiki/Kqueue) syscalls rather than the standard Go [net](https://golang.org/pkg/net/) package.
This is similar to the way that [libuv](https://github.com/libuv/libuv), [libevent](https://github.com/libevent/libevent), [haproxy](http://www.haproxy.org/), [nginx](http://nginx.org/), [redis](http://redis.io/), and other high performance servers work.
The goal of this project is to create a simple server framework for Go that performs on par with Redis and Haproxy for packet handling, but without having to interop with Cgo. My hope is to use this as a foundation for [Tile38](http://github.com/tidwall/tile38) and other projects. Early benchmarks are exceeding my expectations.
- All events are executed in the same thread as the `Serve` call.
-`handle`, `accept`, and `closed` events have an `id` param which is a unique number assigned to the client socket.
-`data` represents a network packet.
-`ctx` is a user-defined context or nil.
-`wake` is a function that when called will trigger the `handle` event with zero data for the specified `id`. It can be called safely from other Goroutines.
-`ticker` is an event that fires between 1 and 1/20 of a second, depending on the packet traffic.
Please check out the [examples](examples) subdirectory for a simplified [redis](examples/redis-server.go) clone and an [echo](examples/echo-server.go) server.