Top 7.0% dependent packages on proxy.golang.org
Top 2.9% forks on proxy.golang.org
proxy.golang.org : github.com/netbrain/goautosocket
The GAS library provides auto-reconnecting TCP sockets in a tiny, fully tested, thread-safe API. The `TCPClient` struct embeds a `net.TCPConn` and overrides its `Read()` and `Write()` methods, making it entirely compatible with the `net.Conn` interface and the rest of the `net` package. This means you should be able to use this library by just replacing `net.Dial` with `gas.Dial` in your code. To test the library, you can run a local TCP server with: and run this code: Then try to kill and reboot your server, the client will automatically reconnect and start sending messages again; unless it has reached its retry limit.
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/netbrain/goautosocket
License: MIT
Latest release: almost 10 years ago
First release: almost 10 years ago
Namespace: github.com/netbrain
Dependent packages: 2
Stars: 12 on GitHub
Forks: 21 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 4 days ago