echoserver

package
v0.0.0-...-a8af069 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultTCPPort is the default TCP port.
	DefaultTCPPort = "7777"
)

Variables

View Source
var (
	// TCPPort is the TCP port to listen on
	TCPPort = DefaultTCPPort
)

These "soft defaults" are configurable by command line flags, etc.

Functions

This section is empty.

Types

type Server

type Server struct {
	TCPPort string
	// contains filtered or unexported fields
}

Server is an echo implementation of the caddy.Server interface type

func NewServer

func NewServer(p string) (*Server, error)

NewServer returns a new echo server

func (*Server) Listen

func (s *Server) Listen() (net.Listener, error)

Listen starts listening by creating a new listener and returning it. It does not start accepting connections.

func (*Server) ListenPacket

func (s *Server) ListenPacket() (net.PacketConn, error)

ListenPacket is a no-op to satisfy caddy.Server interface

func (*Server) OnStartupComplete

func (s *Server) OnStartupComplete()

OnStartupComplete lists the sites served by this server and any relevant information

func (*Server) Serve

func (s *Server) Serve(ln net.Listener) error

Serve starts serving using the provided listener. Serve blocks indefinitely, or in other words, until the server is stopped.

func (*Server) ServePacket

func (s *Server) ServePacket(net.PacketConn) error

ServePacket is a no-op to satisfy caddy.Server interface

Jump to

Keyboard shortcuts

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