Commit Graph

38 Commits

Author SHA1 Message Date
Oleksandr Redko 7bd632cbde chore: Remove redundant build constraint (#1650) 2023-11-08 23:18:13 +01:00
Aoang ea6052464e Add Go 1.19 Support (#1355)
* Update Go Version to Go1.19.x And add cache

* Fix CI Line endings

* Update test CI Go Version to Go1.19.x And add cache

* Update Gosec Security Scanner CI to securego/gosec@v2.12.0

* Format comment

Go 1.19 adds support for links, lists, and clearer headings in doc comments. As part of this change, gofmt now reformats doc comments to make their rendered meaning clearer. See “Go Doc Comments” for syntax details and descriptions of common mistakes now highlighted by gofmt. As another part of this change, the new package go/doc/comment provides parsing and reformatting of doc comments as well as support for rendering them to HTML, Markdown, and text.

ref: https://tip.golang.org/doc/go1.19
ref: https://tip.golang.org/doc/comment

* Fix doc structure
2022-08-14 11:31:57 +02:00
kayos 5b0cbf29b4 Fix apparent documentation typo (#1330) 2022-06-28 09:54:03 +02:00
zhangyongding 16d30c474c Support AIX SO_REUSEADDR and SO_REUSEPORT (#1328)
* Update reuseport.go

* Create reuseport_aix.go
2022-06-26 10:08:47 +02:00
Erik Dubbelboer 7a5afddf5b Use %v for errors and %q for strings (#1262)
Mostly in tests.
2022-04-01 18:11:16 +02:00
Erik Dubbelboer 7670c6eaa6 Fix windows tests (#1235)
* Fix windows tests

Just ignore /../ tests on windows until we have proper suppor.

* Remove useless test code

This code was basically just testing if tcp works. To test if
SO_REUSEPORT works we only have to try to listen on the same addr:port
twice.

* Fix test
2022-03-04 10:02:31 +01:00
tyltr ba401075d3 compatible with new build tag (#1087) 2021-09-02 00:18:53 +02:00
Erik Dubbelboer 5a6e6e102b Add Go 1.17 support (#1074)
* Add Go 1.17 support

* Increase test timeouts
2021-08-18 21:38:21 +02:00
Erik Dubbelboer 9f2c63676d Lower go test time 2021-06-18 14:57:18 +02:00
Erik Dubbelboer 34a61fe63f Update linting (#851) 2020-07-17 14:22:28 +02:00
Andy Pan 33b3cb259e Support Windows SO_REUSEADDR (#822)
* Support Windows SO_REUSEADDR

* Update the comment

* Renew comment of the Listen method on Windows
2020-06-04 16:51:39 +02:00
ZhangYunHao 707b1c1917 Format errors (#679)
* format errors

* Server is a type name

* Fix typo
2019-10-23 20:12:59 +08:00
Erik Dubbelboer 97d51fbf75 go fmt ./... 2019-09-28 14:53:43 +02:00
andrewheberle 8ce231e840 Add stub/wrapper for reuseport.Listen on Windows platforms (#638)
* Create Windows stub for reuseport.Listen
2019-08-30 12:22:25 +02:00
Erik Dubbelboer 7ec2b18772 Remove race condition from test 2018-09-24 22:46:21 +08:00
Kirill Danshin 110dea26f8 ci, reuseport, writer: update travis config and goimports -w on whole project
Signed-off-by: Kirill Danshin <kirill@danshin.pro>
2018-08-12 23:56:32 +03:00
Aliaksandr Valialkin 51bb00256c attempt #2 to fix TestTCP6 on travis: run the test only if local tcp6 interface is present 2017-11-08 19:16:02 +02:00
Aliaksandr Valialkin cb0855b7a4 an attempt to fix TestTCP6 on travis. It looks like travis doesnt know about ip6-localhost. Substitute it with [::1] 2017-11-08 14:10:58 +02:00
Aliaksandr Valialkin 95be7a5849 switch reuseport to github.com/valyala/tcplisten 2016-09-13 18:52:22 +03:00
Aliaksandr Valialkin 0503f9d38c reuseport: enable TCP_FASTOPEN 2016-09-06 16:19:29 +03:00
Aliaksandr Valialkin a0f498b65b reuseport: reduce the number of context switches incurred the listener via TCP_DEFER_ACCEPT 2016-08-29 18:38:03 +03:00
Justin Seely 3d3774799e Enable IPv6 for reuseport (#122) 2016-06-24 17:29:10 +03:00
Anton Tyurin 33ed259db7 reuseport: set FD_CLOSEEXEC for the sockets (#117)
Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2016-06-13 18:00:33 +03:00
Denis Jannot 4959fd04db To make it compatible with the Rumprun unikernel (#98)
* Update reuseport.go

* Update reuseport_bsd.go
2016-05-16 18:54:32 +03:00
Aliaksandr Valialkin e4ed265221 Fixed a typo 2016-05-10 15:00:34 +03:00
Aliaksandr Valialkin f43cd21abb Issue #93: added an example for reuseport.Listener 2016-05-10 14:58:07 +03:00
Anton Tyurin b7687e4f75 reuseport: close Listener in case of error (#94)
If closing of an underlying File returns error, a Listener will not
be returned to a user and will not be closed as well.

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
2016-05-10 14:43:57 +03:00
Aliaksandr Valialkin 8c32cc0674 Fixed golint warnings 2016-02-05 13:53:53 +02:00
Aliaksandr Valialkin c7ac190d63 Use SO_REUSEPORT name instead of reusePort 2016-01-11 17:08:32 +02:00
Aliaksandr Valialkin ce603344f8 Added build tag to reuseport.go since it includes syscall package (accoding to https://www.youtube.com/watch?v=PAAkCSZUG1c :) ) 2015-12-03 13:11:15 +02:00
Aliaksandr Valialkin 495ed4f4a9 Issue #12: added missing import 2015-12-01 18:08:25 +02:00
Aliaksandr Valialkin a0cc899f64 Removed TCP_DEFER_ACCEPT from reuseport listening socket, since it has no measurable performance wins, but has a drawback that the established connection lifetime cannot be controlled by user program until the client sends initial request 2015-11-28 09:26:18 +02:00
Aliaksandr Valialkin 3eba841bb6 Use deferred accept in reuseport.Listener. This should reduce the number of context switches for busy servers accepting a lot of new connections per second. Will test it, since google says TCP_DEFER_ACCEPT option is useless :) 2015-11-27 17:59:38 +02:00
Aliaksandr Valialkin e8afd90adc Added missing package name to reuseport 2015-11-23 14:22:30 +02:00
Aliaksandr Valialkin 47e6a79de6 Added missing doc string 2015-11-22 00:39:45 +02:00
Aliaksandr Valialkin 982240828b Set SO_REUSEADDR in reuseport.Listen() like standard net package do 2015-11-20 15:03:41 +02:00
Aliaksandr Valialkin a109d2bb6e Renamed NewListener to Listener to be consistent with go's net package 2015-11-20 14:55:22 +02:00
Aliaksandr Valialkin db29399a7d Added net.Listener with reuseport support 2015-11-20 14:46:12 +02:00