simpleserver

package
v4.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(path string) (net.Conn, error)

Dial dials a UNIX domain socket and returns a net.Conn connection

func Listen

func Listen(path string) (net.Listener, error)

Listen returns a net.Listener for the specified path

func Run

func Run(path string, handler func(net.Conn) string, errs func(error)) (func(), error)

Run creates and runs a simple server that will call handler for each connection and write back whatever that function returns to the client. Content is served over a Named Pipe on Windows or a Unix domain socket on Linux and Mac. Returns a function that can be called to stop the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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