Commit Graph

7 Commits

Author SHA1 Message Date
Jakub Sokołowski 2158931305
implement darwin os support
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-14 20:42:37 +01:00
Jakub Sokołowski 8100eb9207
use x/sys/unix instead of syscall to fix EpollWait on Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-11 11:47:34 +01:00
Tevin Zhang a89fc1fe18 Refactor
Significant changes:

1. `NewChecker()` accepts no argument, `zeroLinger` is enabled by default
2. Optional parameter `zeroLinger` in `CheckAddr()` turned into `CheckerAddrZeroLinger()`
3. `InitChecker()` -> `CheckingLoop(context)`
4. `ErrNotInitialized` -> `ErrCheckerAlreadyStarted`
5. Fewer system call calling, e.g. `connect()` is called exactly once per check
6. Epoll is now edge-triggered
2019-02-11 17:54:51 +08:00
Tevin Zhang ce742af518 Add fake implementation for non-Linux platform 2016-12-06 17:20:41 +08:00
Tevin Zhang 882b0fcc11 A lot of adjustments
1. 'shaker' renamed to 'check', should have named the repo to
tcp-checker
2. Add NewChecker() for creation
3. Add parameter zeroLinger
4. More error handling (Error from syscall.Close is returned)
2016-07-26 19:25:46 +08:00
Tevin Zhang 83dc726525 Add more doc with some renames 2016-07-22 19:37:00 +08:00
Tevin Zhang 0c7007486a First commit 2016-06-01 13:42:41 +08:00