Re: [PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-18 Thread Christopher Baines
Thanks for the feedback Maxime, I obviously lost track of some things after letting this patch languish for a while. Maxime Devos writes: > On 17-09-2022 10:05, Christopher Baines wrote: >> + if (ioptname == SO_RCVTIMEO || ioptname == SO_SNDTIMEO) >> +{ >> + SCM_ASSERT (scm_is_pair (v

Re: [PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-17 Thread Maxime Devos
On 17-09-2022 10:05, Christopher Baines wrote: + if (ioptname == SO_RCVTIMEO || ioptname == SO_SNDTIMEO) +{ + SCM_ASSERT (scm_is_pair (value), value, SCM_ARG4, FUNC_NAME); How about using SCM_ASSERT_TYPE instead to improve the error message a little? + opt_time.tv_sec = scm

[PATCH] Define SO_RCVTIMEO and SO_SNDTIMEO.

2022-09-17 Thread Christopher Baines
These are important for reliable networking, since they prevent network operations from hanging indefinitely. * libguile/socket.c (scm_init_socket): Define SO_RCVTIMEO and SO_SNDTIMEO. (scm_getsockopt): Include SO_RCVTIMEO and SO_SNDTIMEO in docstring. (scm_setsockopt): Include SO_RCVTIMEO and SO_