Commit Graph

6 Commits

Author SHA1 Message Date
Tevin Zhang 070a54c143 Print error from CheckingLoop 2019-02-12 16:19:46 +08:00
Tevin Zhang f00667a79b WaitReady() before using checker 2019-02-12 16:19:46 +08:00
Tevin Zhang 62afebf5fa Add -v for verbose logging 2019-02-12 16:19:20 +08: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 2d9369c3f0 Concurrent TCP Checker 2016-12-06 17:23:50 +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