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.
View Source
const MaxFrameSize = 1 << 28
MaxFrameSize caps a single data-exchange frame at 256 MiB. Sized to fit the test fleet's 100 MiB file payloads with margin while still rejecting pathological 500 MiB+ frames that would dominate memory.
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.