proxymate

package
v0.0.0-...-10db192 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2013 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Experimental netcraft

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pump

func Pump(conn net.Conn, bufferSize int) (recv chan []byte, fault chan error)

Convenience function for reading byte buffers into a Go channel.

Types

type Client

type Client struct {
	Addr string
	Rate int
	// contains filtered or unexported fields
}

func Dial

func Dial(addr string) (c *Client, err error)

func DialAndPing

func DialAndPing(addr string, rate int) (c *Client, err error)

func (*Client) Ping

func (c *Client) Ping(rate int)

func (*Client) Stop

func (c *Client) Stop()

type Handler

type Handler interface {
	Serve(conn net.Conn, die chan int)
}

type SampleHandler

type SampleHandler struct{}

func (*SampleHandler) Serve

func (h *SampleHandler) Serve(conn net.Conn, die chan int)

type Server

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

func ListenAndServe

func ListenAndServe(addr string, handler Handler) (srv *Server, err error)

func (*Server) IsStopping

func (srv *Server) IsStopping() bool

func (*Server) Serve

func (srv *Server) Serve()

func (*Server) Stop

func (srv *Server) Stop() (err error)

type WaitListener

type WaitListener interface {
	net.Listener
	Wait()
}

func ListenTCP

func ListenTCP(addr string) (wl WaitListener, err error)

Jump to

Keyboard shortcuts

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