Documentation
¶
Index ¶
Constants ¶
View Source
const ( TypeText uint32 = 1 TypeBinary uint32 = 2 TypeJSON uint32 = 3 TypeFile uint32 = 4 )
Frame types for data exchange on port 1001.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client connects to a remote data exchange service on port 1001.
func (*Client) SendBinary ¶
SendBinary sends a binary frame.
type Frame ¶
Frame is a typed data unit exchanged between agents. Wire format: [4-byte type][4-byte length][payload] For TypeFile, payload is: [2-byte name length][name bytes][file data]
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server listens on port 1001 and dispatches incoming frames to a handler.
func (*Server) ListenAndServe ¶
ListenAndServe binds port 1001 and starts accepting connections.
Click to show internal directories.
Click to hide internal directories.