sockets

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package sockets provides helper functions to create and configure Unix or TCP sockets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureTCPTransport

func ConfigureTCPTransport(tr *http.Transport, proto, addr string)

ConfigureTCPTransport configures the specified Transport according to the specified proto and addr. If the proto is unix (using a unix socket to communicate) the compression is disabled.

func NewTCPSocket

func NewTCPSocket(addr string, tlsConfig *tls.Config) (net.Listener, error)

NewTCPSocket creates a TCP socket listener with the specified address and and the specified tls configuration. If TLSConfig is set, will encapsulate the TCP listener inside a TLS one.

func NewUnixSocket

func NewUnixSocket(path, group string) (net.Listener, error)

NewUnixSocket creates a unix socket with the specified path and group.

Types

This section is empty.

Jump to

Keyboard shortcuts

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