MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / callHostHTTPStreamClose

Method callHostHTTPStreamClose

internal/pluginhost/host_callbacks.go:208–217  ·  view source on GitHub ↗
(request []byte)

Source from the content-addressed store, hash-verified

206}
207
208func (h *Host) callHostHTTPStreamClose(request []byte) ([]byte, error) {
209 var req rpcHostHTTPStreamCloseRequest
210 if errUnmarshal := json.Unmarshal(request, &req); errUnmarshal != nil {
211 return nil, fmt.Errorf("decode host http stream close request: %w", errUnmarshal)
212 }
213 if h != nil && h.httpStreams != nil {
214 h.httpStreams.close(req.StreamID)
215 }
216 return marshalRPCResult(rpcEmptyResponse{})
217}
218
219func decodeHostHTTPRequest(raw []byte) (pluginapi.HTTPRequest, error) {
220 httpReq, _, errDecode := decodeHostHTTPRequestWithCallbackID(raw)

Callers 1

callFromPluginMethod · 0.95

Calls 2

marshalRPCResultFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected