Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit 080cd32

Browse files
authored
Merge pull request #12 from randlabs/added_options
Added server concurrency option
2 parents c718d28 + ecb0492 commit 080cd32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webserver.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ type Options struct {
6868
// has returned.
6969
WriteTimeout time.Duration
7070

71+
// The maximum number of concurrent connections the server may serve. Defaults to 256K connections.
72+
Concurrency int
73+
7174
// Maximum number of concurrent client connections allowed per IP.
7275
MaxConnsPerIP int
7376

@@ -260,6 +263,7 @@ func Create(options Options) (*Server, error) {
260263
Handler: srv.createMasterHandler(h),
261264
ReadTimeout: readTimeout,
262265
WriteTimeout: writeTimeout,
266+
Concurrency: options.Concurrency,
263267
MaxConnsPerIP: maxConnsPerIP,
264268
MaxRequestsPerConn: maxRequestsPerConn,
265269
DisableKeepalive: true,

0 commit comments

Comments
 (0)