Closed Cazra closed 2 years ago
That function is not supported in ChezScheme --- https://docs.racket-lang.org/foreign/foreign_pointer-funcs.html#%28def._%28%28quote._~23~25foreign%29._make-sized-byte-string%29%29
Are there any plans to add compatibility to this project to support socket-recv!
in ChezScheme?
I have no plans and I assume that @mflatt can't support make-sized-byte-string
. If you find a way to make something similar works, I'd merge it!
It looks like the use here
(make-sized-byte-string (msg-data-pointer m) (msg-size m))
could be replaced with
(let ([s (make-bytes (msg-size m))])
(memcpy s (msg-data-pointer m) (msg-size m))
s)
This copies data out of the message instead of pointing inside message. But socket-recv!
was copying anyway, and thebytes-copy
there could be removed.
I'm having trouble using the
socket-recv!
function. Whenever I try to invoke it, I get the following error:make-sized-byte-string: unsupported
Here's a minimal code example for how I'm trying to use it: