Skip to content

smallnest/epoller

Repository files navigation

epoller

epoll implementation for connections in Linux, MacOS and Windows.

License GoDoc github actions Go Report Card coveralls

Its target is implementing a simple epoll lib for nework connections, so you should see it only contains few methods about net.Conn:

type Poller interface {
	// Add adds an existed connection to poller.
	Add(conn net.Conn) error
	// Remove removes a connection from poller. Notice it doesn't call the conn.Close method.
	Remove(conn net.Conn) error
	// Wait waits for at most count events and returns the connections.
	Wait(count int) ([]net.Conn, error)
	// Close closes the poller. If closeConns is true, it will close all the connections.
	Close(closeConns bool) error
}

Inspired by 1m-go-websockets.

Contributors

see contributors.

About

epoll implementation for connections in Linux, MacOS and Windows

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •