Commit Graph

26 Commits

Author SHA1 Message Date
Tevin Zhang f3158e873d Add fds to epoll_ctl error message 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 2ef7e36ff8 Fix WaitReady() for nonlinux platform 2019-02-12 15:22:22 +08:00
Tevin Zhang a72775abcb Add special thanks 2019-02-12 15:22:22 +08:00
Tevin Zhang 8e82d76788 Ensure safety before reuse of pipe 2019-02-12 15:22:22 +08:00
Tevin Zhang 201333fdee Remove lock 2019-02-12 15:22:22 +08:00
Tevin Zhang 7c5283d607 Refine doc 2019-02-11 18:42:46 +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 1573d54316
Merge pull request #8 from lujjjh/zerolinger-on-nonlinux
Add zeroLinger support for non-Linux platform
2019-01-06 20:04:10 +08:00
lujjjh c27d2836c6
Add zeroLinger support for POSIX operating systems 2018-05-22 13:16:48 +08:00
Tevin Zhang 2d9369c3f0 Concurrent TCP Checker 2016-12-06 17:23:50 +08:00
Tevin Zhang ce742af518 Add fake implementation for non-Linux platform 2016-12-06 17:20:41 +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 b34a84cbb7 Add tests 2016-07-22 19:37:07 +08:00
Tevin Zhang 83dc726525 Add more doc with some renames 2016-07-22 19:37:00 +08:00
Tevin Zhang f2b515e1c4 Add command line tool 2016-07-22 16:58:53 +08:00
Tevin Zhang fecad2b47b Add Go Report Card 2016-06-28 18:10:56 +08:00
Tevin Zhang ecd883184f Refine package description 2016-06-02 11:08:46 +08:00
Tevin Zhang b1b6beb4d3 Add usage in README 2016-06-01 18:23:31 +08:00
Tevin Zhang 9b0c49fe5e Fix typo 2016-06-01 18:18:41 +08:00
Tevin Zhang 67b523fe25 Better error handling 2016-06-01 17:47:04 +08:00
Tevin Zhang 944163aafd Add Shaker.Ready() and Shaker.EpollFd() 2016-06-01 17:46:36 +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
Tevin Zhang 69c453cad7 Initial commit 2016-05-31 18:19:07 +08:00