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

Function go_read_post

frankenphp.go:635–651  ·  view source on GitHub ↗

export go_read_post

(threadIndex C.uintptr_t, cBuf *C.char, countBytes C.size_t)

Source from the content-addressed store, hash-verified

633
634//export go_read_post
635func go_read_post(threadIndex C.uintptr_t, cBuf *C.char, countBytes C.size_t) (readBytes C.size_t) {
636 fc := phpThreads[threadIndex].frankenPHPContext()
637
638 if fc.responseWriter == nil {
639 return 0
640 }
641
642 p := unsafe.Slice((*byte)(unsafe.Pointer(cBuf)), countBytes)
643 var err error
644 for readBytes < countBytes && err == nil {
645 var n int
646 n, err = fc.request.Body.Read(p[readBytes:])
647 readBytes += C.size_t(n)
648 }
649
650 return
651}
652
653//export go_read_cookies
654func go_read_cookies(threadIndex C.uintptr_t) *C.char {

Callers

nothing calls this directly

Calls 1

frankenPHPContextMethod · 0.65

Tested by

no test coverage detected