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

Method InsertReceiveRequest

polyamide/conn/bind_windows.go:359–374  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357}
358
359func (bind *afWinRingBind) InsertReceiveRequest() error {
360 packet := bind.rx.Push()
361 dataBuffer := &winrio.Buffer{
362 Id: bind.rx.id,
363 Offset: uint32(uintptr(unsafe.Pointer(&packet.data[0])) - bind.rx.packets),
364 Length: uint32(len(packet.data)),
365 }
366 addressBuffer := &winrio.Buffer{
367 Id: bind.rx.id,
368 Offset: uint32(uintptr(unsafe.Pointer(&packet.addr)) - bind.rx.packets),
369 Length: uint32(unsafe.Sizeof(packet.addr)),
370 }
371 bind.mu.Lock()
372 defer bind.mu.Unlock()
373 return winrio.ReceiveEx(bind.rq, dataBuffer, 1, nil, addressBuffer, nil, nil, 0, uintptr(unsafe.Pointer(packet)))
374}
375
376//go:linkname procyield runtime.procyield
377func procyield(cycles uint32)

Callers 2

ReceiveMethod · 0.95
OpenMethod · 0.80

Calls 2

ReceiveExFunction · 0.92
PushMethod · 0.80

Tested by

no test coverage detected