MCPcopy Index your code
hub / github.com/php/frankenphp / SendMessage

Method SendMessage

workerextension.go:47–57  ·  view source on GitHub ↗

EXPERIMENTAL: SendMessage sends a message to the worker and waits for a response.

(ctx context.Context, message any, rw http.ResponseWriter)

Source from the content-addressed store, hash-verified

45
46// EXPERIMENTAL: SendMessage sends a message to the worker and waits for a response.
47func (w *extensionWorkers) SendMessage(ctx context.Context, message any, rw http.ResponseWriter) (any, error) {
48 fc := newFrankenPHPContext()
49 fc.logger = globalLogger
50 fc.worker = w.internalWorker
51 fc.responseWriter = rw
52 fc.handlerParameters = message
53
54 err := w.internalWorker.handleRequest(contextHolder{context.WithValue(ctx, contextKey, fc), fc})
55
56 return fc.handlerReturn, err
57}

Callers

nothing calls this directly

Calls 2

newFrankenPHPContextFunction · 0.85
handleRequestMethod · 0.80

Tested by

no test coverage detected