conn

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: GPL-3.0, GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPortFromEnvironmentVariable

func GetPortFromEnvironmentVariable(portEnvVariable string) (int, error)

func GetResponseForGaugeMessage

func GetResponseForGaugeMessage(message *gauge_messages.Message, conn net.Conn) (*gauge_messages.Message, error)

func GetResponseForMessageWithTimeout

func GetResponseForMessageWithTimeout(message *gauge_messages.Message, conn net.Conn, t time.Duration) (*gauge_messages.Message, error)

func SendProcessKillMessage added in v0.3.0

func SendProcessKillMessage(connection net.Conn)

SendProcessKillMessage sends a KillProcessRequest message through the connection.

func Write

func Write(conn net.Conn, messageBytes []byte) error

func WriteDataAndGetResponse

func WriteDataAndGetResponse(conn net.Conn, messageBytes []byte) ([]byte, error)

func WriteGaugeMessage

func WriteGaugeMessage(message *gauge_messages.Message, conn net.Conn) error

Types

type GaugeConnectionHandler

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

func NewGaugeConnectionHandler

func NewGaugeConnectionHandler(port int, messageHandler messageHandler) (*GaugeConnectionHandler, error)

func (*GaugeConnectionHandler) AcceptConnection

func (connectionHandler *GaugeConnectionHandler) AcceptConnection(connectionTimeOut time.Duration, errChannel chan error) (net.Conn, error)

func (*GaugeConnectionHandler) ConnectionPortNumber

func (connectionHandler *GaugeConnectionHandler) ConnectionPortNumber() int

func (*GaugeConnectionHandler) HandleMultipleConnections

func (connectionHandler *GaugeConnectionHandler) HandleMultipleConnections()

HandleMultipleConnections accepts multiple connections and Handler responds to incoming messages

Jump to

Keyboard shortcuts

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