MCPcopy Create free account
hub / github.com/encodeous/nylon / readRequest

Function readRequest

core/ipc_handler.go:42–52  ·  view source on GitHub ↗
(rw *bufio.ReadWriter)

Source from the content-addressed store, hash-verified

40}
41
42func readRequest(rw *bufio.ReadWriter) (*protocol.IpcRequest, error) {
43 line, err := rw.ReadBytes('\n')
44 if err != nil {
45 return nil, err
46 }
47 req := &protocol.IpcRequest{}
48 if err := pjUnmarshal.Unmarshal(line, req); err != nil {
49 return nil, fmt.Errorf("unmarshal request: %w", err)
50 }
51 return req, nil
52}
53
54func HandleNylonIPC(n *Nylon, rw *bufio.ReadWriter) error {
55 req, err := readRequest(rw)

Callers 1

HandleNylonIPCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected