It seems at least like the client code (sample session) doesn't match the library.
I get the error:
Exception in c-write: invalid foreign-procedure argument "(let ((x 3)) x)\n"
I changed the c-write signature in the socket library in Scheme to take utf-8 instead of u8*, and also adjusted the other parameters to match the C code.
When using c-read, I need to pass in a mutable buffer, so I do that in the client code.
In the client code, I provide the start parameter as 0 both when calling c-write and c-read.
I also commented out the first get, which seems blocking.
It seems at least like the client code (sample session) doesn't match the library.
I get the error:
I changed the
c-write
signature in the socket library in Scheme to takeutf-8
instead ofu8*
, and also adjusted the other parameters to match the C code.When using
c-read
, I need to pass in a mutable buffer, so I do that in the client code.In the client code, I provide the start parameter as 0 both when calling
c-write
andc-read
.I also commented out the first get, which seems blocking.
You can see the diff here: https://github.com/namin/chezscheme-socket/commit/d4c7bfac6a108bb513d7af81c001adfd455df558
Thanks.