fasthttputil

package
v0.0.0-...-f8c0d95 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InmemoryListener

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

InmemoryListener provides in-memory dialer<->net.Listener implementation.

It may be used either for fast in-process client<->server communcations without network stack overhead or for client<->server tests.

func NewInmemoryListener

func NewInmemoryListener() *InmemoryListener

NewInmemoryListener returns new in-memory dialer<->net.Listener.

func (*InmemoryListener) Accept

func (ln *InmemoryListener) Accept() (net.Conn, error)

Accept implements net.Listener's Accept.

It is safe calling Accept from concurrently running goroutines.

Accept returns new connection per each Dial call.

func (*InmemoryListener) Addr

func (ln *InmemoryListener) Addr() net.Addr

Addr implements net.Listener's Addr.

func (*InmemoryListener) Close

func (ln *InmemoryListener) Close() error

Close implements net.Listener's Close.

func (*InmemoryListener) Dial

func (ln *InmemoryListener) Dial() (net.Conn, error)

Dial creates new client<->server connection, enqueues server side of the connection to Accept and returns client side of the connection.

It is safe calling Dial from concurrently running goroutines.

Jump to

Keyboard shortcuts

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