package sockets

import "github.com/docker/docker/pkg/sockets"

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

Index

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, activate <-chan struct{}) (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. The channel passed is used to activate the listenbuffer when the caller is ready to accept connections.

func NewUnixSocket

func NewUnixSocket(path, group string, activate <-chan struct{}) (net.Listener, error)

NewUnixSocket creates a unix socket with the specified path and group. The channel passed is used to activate the listenbuffer when the caller is ready to accept connections.

Source Files

tcp_socket.go unix_socket.go

Version
v1.9.0-rc3
Published
Oct 28, 2015
Platform
linux/amd64
Imports
11 packages
Last checked
1 minute ago

Tools for package owners.