Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AlreadyRunningError = errors.New("already running") NotRunningError = errors.New("not running") )
Functions ¶
This section is empty.
Types ¶
type Chan ¶
type Chan struct { Sender libchan.Sender Receiver libchan.Receiver RemoteSender libchan.Sender Transport *spdy.Transport }
type ChanServer ¶
type ChanServer struct { Quiet bool // When true, logging will be suppressed. // contains filtered or unexported fields }
ChanServer provides a generic stoppable TCP server which is wired to any desired channel receiver handler.
func NewChanServer ¶
func NewChanServer(laddr string, receiverHandler ReceiverHandler) *ChanServer
NewChanServer creates a new instance of TCP ChanServer.
laddr is a string representing the interface and port to listen on. e.g. ":8001", "127.0.0.1:8001", etc.
receiverHandler is a ReceiverHandler function to send inbound channel requests to.
func (*ChanServer) Addr ¶
func (cs *ChanServer) Addr() net.Addr
Addr returns the listener address and port.
type ReceiverHandler ¶
ReceiverHandler is the type of the handler function to pass in when creating a new ChanServer.
Click to show internal directories.
Click to hide internal directories.