Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smallnest/epoller
epoll implementation for connections in Linux, MacOS and Windows
https://github.com/smallnest/epoller
epoll golang network socket tcp
Last synced: 2 days ago
JSON representation
epoll implementation for connections in Linux, MacOS and Windows
- Host: GitHub
- URL: https://github.com/smallnest/epoller
- Owner: smallnest
- License: mit
- Created: 2019-03-22T06:42:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T10:03:56.000Z (4 months ago)
- Last Synced: 2025-01-13T00:09:09.931Z (9 days ago)
- Topics: epoll, golang, network, socket, tcp
- Language: C
- Homepage:
- Size: 76.2 KB
- Stars: 84
- Watchers: 10
- Forks: 28
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# epoller
epoll implementation for connections in **Linux**, **MacOS** and **Windows**.[![License](https://img.shields.io/:license-MIT-blue.svg)](https://opensource.org/licenses/MIT) [![GoDoc](https://godoc.org/github.com/smallnest/epoller?status.png)](http://godoc.org/github.com/smallnest/epoller) [![github actions](https://github.com/smallnest/epoller/actions/workflows/go.yml/badge.svg)](https://github.com/smallnest/epoller/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/smallnest/epoller)](https://goreportcard.com/report/github.com/smallnest/epoller) [![coveralls](https://coveralls.io/repos/smallnest/epoller/badge.svg?branch=master&service=github)](https://coveralls.io/github/smallnest/epoller?branch=master)
Its target is implementing a simple epoll lib for nework connections, so you should see it only contains few methods about net.Conn:
```go
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](https://github.com/eranyanay/1m-go-websockets).
## Contributors
see [contributors](https://github.com/smallnest/rpcx/graphs/contributors).