Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadCast = errors.New("bad cast from gregor type to protocol type")
ErrBadCast occurs when there is a problem casting a type from gregor to protocol.
View Source
var ErrBadUID = errors.New("bad UID on channel")
ErrBadUID occurs when there is a bad UID on the auth channel.
Functions ¶
func IsSocketClosedError ¶
IsSocketClosedError returns true if e looks like an error due to the socket being closed. net.errClosing isn't exported, so do this.. UGLY!
Types ¶
type Authenticator ¶
type Authenticator interface {
Authenticate(ctx context.Context, tok protocol.AuthToken) (protocol.UID, protocol.SessionID, error)
}
Authenticator is an interface for handling authentication.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an RPC server that implements gregor.NetworkInterfaceOutgoing and gregor.NetworkInterface.
func NewServer ¶
func NewServer() *Server
NewServer creates a Server. You must call ListenLoop(...) and Serve(...) for it to be functional.
func (*Server) BroadcastMessage ¶
BroadcastMessage implements gregor.NetworkInterfaceOutgoing.
func (*Server) ListenLoop ¶
ListenLoop listens for new connections on net.Listener.
Click to show internal directories.
Click to hide internal directories.