reuseport

package
v0.0.0-...-0ac2d5f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2015 License: MIT, MIT Imports: 5 Imported by: 0

Documentation

Overview

Package reuseport provides TCP net.Listener with SO_REUSEPORT support.

SO_REUSEPORT allows linear scaling server performance on multi-CPU servers. See https://www.nginx.com/blog/socket-sharding-nginx-release-1-9-1/ for more details :)

The package is based on https://github.com/kavu/go_reuseport .

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listen

func Listen(network, addr string) (l net.Listener, err error)

Listen returns TCP listener with SO_REUSEPORT option set.

Only tcp4 network is supported.

ErrNoReusePort error is returned if the system doesn't support SO_REUSEPORT.

Types

type ErrNoReusePort

type ErrNoReusePort struct {
	// contains filtered or unexported fields
}

ErrNoReusePort is returned if the OS doesn't support SO_REUSEPORT.

func (*ErrNoReusePort) Error

func (e *ErrNoReusePort) Error() string

Error implements error interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL