socket-server should accept
:backlog and pass it on to listen() and
:interface and use it instead of the socket argument.
(socket-server socket-stream)
should be deprecated (show a warning) in favor of
(socket-server nil :interface socket-stream)
:interface argument should be one of
- socket-stream
- raw socket
- string (IP address)
and default to "0.0.0.0" as it is now
(or maybe "localhost" for security?)
:backlog argument should be a fixnum and default to 1
files to be changed:
src/stream.d: make socket-server accept keyword arguments
src/socket.d: make create_server_socket accept backlog
src/subr.d, src/subrkw.d: change the signature of
socket-server
doc/impext.xml: update the documentation for socket-server
Logged In: YES
user_id=5735
http://article.gmane.org/gmane.lisp.clisp.general:10553
Logged In: YES
user_id=120720
I have a working patch (thought not polished with respect
to all possible parameters combinations yet) to make this
work, so I know I can do it; however, I can not upload any
files to this request in tracker. Can you do something
with it (maybe assigning would help), or shall I put final
patch to patches?
Also, I had to change few more files, src/constsym.d and
src/clisp.h to allow for new keywords - as I am doing such
modifications for the first time, I am not sure if this is
necessary.
Logged In: YES
user_id=5735
to upload you need to check a box _and_ enther the path.
clisp.h is a generated file, do not touch it.
constsym.d is indeed to be changed, yes.
please do not forget a src/ChangeLog entry.
please also take a look at src/CodingStyle.
thanks.
Logged In: YES
user_id=120720
The problem is that I do not have the box _neither_ file
selection form present :) I can only Add a comment.
Logged In: YES
user_id=5735
thanks, this is a great start - just a few notes:
1. stream_to_socket should not be needed - there are plenty
of FD extractors already
2. warnings are issued by funcall(S(warn),...), not fprintf
3. please avoid "# " comments in new code, use /**/ instead
4. backlog is int, why are you using I_to_sint16?
I suggest int backlog = check_uint_defaulted(popSTACK(),1);
5. in documentation, use <function
role="unix">listen</function>.
6. also, the use of socket as the first argument should be
no longer documented.
implementation from Tomas v1
Logged In: YES
user_id=120720
1. I tried to find proper extractor but failed (and it was
this way in the source). Ill look once more.
2., 3., 5., 6. - OK.
4. - uint/sint - my overlook.
- check_uint_defaulted is not in my lispbibl.d, only in
clisp.h, and it does not appear to be included.
Logged In: YES
user_id=5735
1 use stream_handles()
4 ok, I will enable check_uint_defaulted() in lispbibl.d
implementation from Tomas v3