Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing Section 4.9 Example: Socket Operations in the Chez Scheme User's Guide for Version 9.5.8 #701

Open
namin opened this issue Jun 15, 2023 · 1 comment
Labels
documentation Requested documentation improvements.

Comments

@namin
Copy link

namin commented Jun 15, 2023

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.

You can see the diff here: namin/chezscheme-socket@d4c7bfa

Thanks.

@jltaylor-us jltaylor-us added the documentation Requested documentation improvements. label Jun 16, 2023
@jltaylor-us
Copy link
Contributor

A more up-to-date version of that example can be found in examples/socket.ss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Requested documentation improvements.
Projects
None yet
Development

No branches or pull requests

2 participants