Scieneer Common Lisp 1.3.9 online documentation

sys:fd-stream-fd stream &optional direction[Function]

Return the underlying file descriptor for the stream, otherwise signal an error. The optional direction, which defaults to :io, may be either:

:io
Return the input or output file descriptor, otherwise signal an error. If the stream has both then the input file descriptor is returned.
:input
Return the input file descriptor, otherwise signal an error.
:ouput
Return the output file descriptor, otherwise signal an error.

The file descriptor based streams include local file streams, network socket streams, and SSL streams. This function is implemented by the generic function ext:stream-file-descriptor. See also ext:stream-waiting-file-descriptor.