Commit Graph

7 Commits

Author SHA1 Message Date
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 2d25c4a3e0 Retry connect when EINPROGRESS etc is encountered
Version older than this may leads to false positive results from CheckAddr
2016-10-18 21:00:00 +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 67b523fe25 Better error handling 2016-06-01 17:47:04 +08:00
Tevin Zhang f6beed899b Make Shaker's methods goroutine safe 2016-06-01 17:46:12 +08:00
Tevin Zhang 0c7007486a First commit 2016-06-01 13:42:41 +08:00