net

package
v0.0.0-...-71312fb Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2018 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package net implements all network communication.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Listener

type Listener struct {
	// TODO: Rename to something else. It doesn't just listen.
	Server *geanstalkd.Server
}

Listener listens for network connections and handles network traffic. See [1] for the exact protocol. All network request-responses are backed by a geanstalkd.Server.

[1] https://raw.githubusercontent.com/kr/beanstalkd/master/doc/protocol.txt

func (*Listener) Serve

func (tl *Listener) Serve(ctx context.Context, l net.Listener)

Serve is the network loop that accepts incoming connections and handles request-responses. This function blocks. To close it, mark the ctx as done.

Jump to

Keyboard shortcuts

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