[Ecls-list] Proposed minor change to sockets.lisp

Matthew Mondor mm_lists at pulsar-zone.net
Mon Jul 18 17:15:01 UTC 2011


I noticed that the INET accept method for SOCKET-ACCEPT would return
the socket object as the first value, followed by a vector as the
second value holding the four octets of the client IP address.
However, the port was missing, and to obtain it an extra syscall would
be required, yet accept(2) is designed to also fill the port part of
the sockaddr.

This minor patch adds a third value, the port number.  The SBCL
documentation on sb-bsd-sockets:socket-accept also only refers to two
values, but adding a third value should not hurt existing applications,
and seems to be the logical thing to do.  I did not check if the actual
SBCL implementation also now does it, but it's possible; it otherwise
would be good to file a bug report for it...

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ecl-port-diff.txt
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110718/113d5172/attachment.txt>

More information about the ecl-devel mailing list