Documentation
¶
Index ¶
- Variables
- func ParseMessage(data []byte, mtype int) (cmd string, meta map[string]string, outd []byte, end int)
- func SendFrameLenBinary(con io.Writer, data ...[]byte) (int, error)
- type UdsConn
- func (uds *UdsConn) Close()
- func (uds *UdsConn) File() *os.File
- func (conn *UdsConn) HandleStream()
- func (uds *UdsConn) Read(out []byte) (int, error)
- func (uc *UdsConn) Redial() error
- func (uds *UdsConn) SendMessage(m *msgs.Message) error
- func (uds *UdsConn) SendMessageDirect(cmd string, meta map[string]string, data []byte) error
- func (uds *UdsConn) WriteFD(data []byte, file *os.File) (int, error)
- func (uds *UdsConn) WriteFDs(data []byte, file []*os.File) (int, error)
- type UdsServer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Debug = false
)
Functions ¶
Types ¶
type UdsConn ¶
type UdsConn struct { msgs.MsgConnection Handler msgs.MessageHandler Reader *bufio.Reader // Name of the UDS file. The unix addr will be under net=unix, as @Name Name string // Received file descriptors. Files []*os.File Pid int32 Uid, Gid uint32 // contains filtered or unexported fields }
UdsConn represents a client or server connection. This is not thread safe, should be used from a single receiver routine. Implements msgs.Framer and has a Send function.
func (*UdsConn) HandleStream ¶
func (conn *UdsConn) HandleStream()
Handle the client messages, after dialing to a server.
func (*UdsConn) SendMessage ¶
Distribute the message to all UDS connections Implements the Transport interface.
func (*UdsConn) SendMessageDirect ¶
Send a message over a UDS connection. Framed with a length prefix.
type UdsServer ¶
type UdsServer struct { // Name of the server. Name string Gid int // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.