Documentation
¶
Overview ¶
Package domainsockets prvoides for a unix domain socket server, similar to an RPC server like Grpc except that it is intended to only connect unix processes on the same device.
Usage ¶
Usage is fairly simple:
s, err := NewServer() if err != nil { // Do something } s.Register(header, handler) if err := s.Start(); err != nil { // Do something }
Index ¶
Constants ¶
View Source
const ( DataPacket uint64 = 0 DataClose uint64 = 1 DataHandler uint64 = 2 KeepAlive uint64 = 3 )
Various tlv types.
View Source
const (
MiB = 1048576
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Call ¶
Call represents the input/output for a procedure calls. If input, Data represents the input arguments. If output, it represents the return data.
type Handler ¶
Handler provides a function that answers a request from a client and returns a response.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides a Unix Domain Socket procedure calling service.
func (*Server) Close ¶
func (s *Server) Close()
Close closes all connections. This server object cannot be reused.
Click to show internal directories.
Click to hide internal directories.