Documentation ¶
Overview ¶
Package rpc provides helper structs for rpc server and client implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Server ¶
type Server struct { Addr string // contains filtered or unexported fields }
func NewServer ¶
NewServer creates a new server providing with the given rpc name, rpc object, and tcp address.
func (*Server) Accept ¶
func (s *Server) Accept()
Accept starts accepting calls. This method blocks.
func (*Server) RegisterAndListen ¶
RegisterAndListen does what is says. The caller is responsible to Close() the server afterwards.
type ServerPair ¶
type ServerPair struct {
// contains filtered or unexported fields
}
func NewServerPair ¶
func NewServerPair(name string, main, operations *Server) *ServerPair
NewServerPair creates a new rpc server pair with the given name.
func (*ServerPair) Accept ¶
func (p *ServerPair) Accept()
Accept starts accepting calls. This method blocks.
func (*ServerPair) Close ¶
func (p *ServerPair) Close() error
func (*ServerPair) RegisterAndListen ¶
func (p *ServerPair) RegisterAndListen() error
Click to show internal directories.
Click to hide internal directories.