[gambit-list] Get OS file descriptor of TCP socket port Re:

Mikael mikael.trash at gmail.com
Sun Jan 17 11:54:22 EST 2010


2010/1/17 Taylor Venable <taylor at metasyntax.net>


>
> A question about your approach: doesn't this assume that the socket file
> descriptor will always be located in memory immediately after the device
> stream struct base?


That's correct. In case this part of Gambit is rewritten, it will need to be
updated.

That an update is needed would immediately be noticed, through that
tcp-socket-port->fd would return an invalid, unusable return value.

As I get it, there are no plans nor reasons to change this part of Gambit.


> It seems like that would be prone to the same
> problems of a change in Gambit that including the definition of
> ___device_tcp_client_struct would, but perhaps with less possibility of
> the compiler warning you.
>

Correct, the compiler would not warn.


> Is there some trick to accessing util#device-port-rdevince-condvar?
> When I compile that I get:
>
> WARNING -- "util#device-port-rdevice-condvar" is not defined
>

For the code for that support procedure, please refer to the (std net/tcpip)
module of Black Hole's bundled libraries. You may want to remove "util#".


> for which reason in my code I use (##include "_gambit#.scm") and then
> call macro-device-port-rdevice-condvar.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100117/ae7d3604/attachment.htm>


More information about the Gambit-list mailing list