Commit graph

86 commits

Author SHA1 Message Date
Kris Katterjohn
de661f580a Add ABORT keyword argument to SB-BSD-SOCKETS:SOCKET-CLOSE
This keyword argument was added in SBCL in 2010 and is used to pass
ABORT to CL:CLOSE.

The absence of this would obviously cause errors when code expects
this to be available.  For example, this happens in usocket's
SOCKET-CONNECT and would cause several errors in their test suite
with obscure error messages like

  Wrong number of arguments passed to function #<compiled-function 0000000003562e80>.

This is untested on Windows.
2017-02-11 19:18:50 -06:00
Daniel Kochmański
e640ef1c2b haiku: define ESOCKTNOSUPPORT to ENOTSUP
Haiku lacks some parts of POSIX API. Workaround to make sockets work.
2016-09-06 21:55:56 +02:00
Fabrizio Fabbri
52de2ceea6 Fix compilation for AIX and xlc compiler. 2016-03-02 12:08:48 -05:00
Eric Timmons
6eede933dd Add defaults for NETDB_{INTERNAL,SUCESS}.
NETDB_INTERNAL and NETDB_SUCCESS are not defined by POSIX, so some
libc implementations (such as musl) do not have them. When compiling
sockets contrib, check if these are defined and, if not, define them to
be zero.
2016-02-24 21:48:57 -05:00
Daniel Kochmański
7feed6c6f4 contrib: call provide uniformly
Various contrib modules called provide with varying syntax from "module"
through 'module to '#:module. The last one is picked:

(provide '#:module)
2015-10-23 18:18:58 +02:00
Daniel Kochmański
58ee224fe3 cosmetic: replace push' with pushnew'
When appending :wsock to *features*.
2015-10-23 18:16:50 +02:00
Sylvain Ageneau
5b0a9fe6c5 mobile: fix socket implementation on android
getprotobyname is not implemented in bionic libc.
2015-10-23 18:12:54 +02:00
Zack Piper
00521d869a Untabify everything. 2015-09-01 20:10:10 +00:00
Arto Bendiken
fa48714dd8 Fixed a NUL-termination bug in SOCKET-BIND and SOCKET-CONNECT.
The backslash in '\0' got lost on the way to the generated C file
(build/ext/sockets.c). There may be more of these issues elsewhere
in the code base.

This resolves CIDs 66405 and 66413 (Buffer not null terminated).
2014-10-14 21:39:58 +00:00
Philipp Marek
50ba000738 getprotobyname() may return NULL, causing segfaults in this function. 2014-02-22 11:00:53 +01:00
Juanjo Garcia-Ripoll
434c753e78 sockets.lisp defined MSG_WAITALL in an incompatible manner for cygwin (which now supports this flag) 2013-10-06 17:01:06 +02:00
Juan Jose Garcia Ripoll
5f4c7eee93 Coercions needed to compile on Windows with C++ compiler. 2012-08-25 00:24:46 +02:00
Juan Jose Garcia Ripoll
146b06794c Update the name of the stream mode constants in sockets.lisp 2012-07-08 21:19:11 +02:00
Juan Jose Garcia Ripoll
825fc8cbd3 Cnil and Ct are now part of legacy 2012-06-30 23:01:40 +02:00
Juan Jose Garcia Ripoll
a2c88a372b SOCKET-ACCEPT should return the port as a third value (M. Mondor) 2011-07-31 09:43:35 +02:00
Juan Jose Garcia Ripoll
5918c54f23 Fixed documentation and error string typos (P. Van Eynde) 2011-03-05 15:11:49 +01:00
Juan Jose Garcia Ripoll
02241f886a In sockets.lisp, the stream element type was overriden by a character-mode stream flag. 2011-01-26 14:34:39 +01:00
Juan Jose Garcia Ripoll
e6d180e7df The socket functions now accept an optional :ELEMENT-TYPE keyword argument, in addition to :EXTERNAL-FORMAT 2011-01-24 23:03:14 +01:00
Juan Jose Garcia Ripoll
c591f61d3e The nosignal argument to SOCKET-SEND works now also in BSD systems 2010-10-17 16:50:11 +02:00
Juan Jose Garcia Ripoll
747fddfecf Fixed typo in assertion 2010-05-27 20:05:07 +02:00
Juan Jose Garcia Ripoll
dacffdc468 SERVE-EVENT now allows streams and sockets as arguments, instead of file descriptors. 2010-02-22 15:11:41 +01:00
Juan Jose Garcia Ripoll
d8e828bf35 :EXTERNAL-FORMAT did not work on bi-directional sockets. 2010-02-19 00:22:19 +01:00
Juan Jose Garcia Ripoll
cce95aa087 Missing arguments in function call 2010-02-17 23:55:43 +01:00
Juan Jose Garcia Ripoll
f3fa64c038 Missing argument in call to socket-make-stream-inner. 2010-02-17 22:41:08 +01:00
Juan Jose Garcia Ripoll
3f341b28dd Fix SOCKET-MAKE-STREAM so that it works in Windows. 2010-02-17 20:49:49 +01:00
Juan Jose Garcia Ripoll
1941458e0d In SOCKETS, the stream is created as a two-way stream that automatically closes its components. We also make sure that the file descriptor is duplicated when using both input and output channels and implement new options :INPUT, :OUTPUT and :EXTERNAL-FORMAT for SOCKET-MAKE-STREAM. 2010-02-17 14:49:41 +01:00
Juan Jose Garcia Ripoll
113dd3c2ef When using threads and sockets, the stream is a two-way streams and its components must be closed separately. 2010-02-13 15:35:42 +01:00
Juan Jose Garcia Ripoll
dd4d8e036f Socket streams are now two-way streams. 2010-02-12 18:33:04 +01:00
Juan Jose Garcia Ripoll
b606466993 contrib/sockets/sockets.lisp: Implemente SO_LINGER properly (needs struct linger) (M. Mondor). In Windows, set-sockopt-timeval had the older interface, without the socket level. 2009-10-18 18:51:14 +02:00
Juan Jose Garcia Ripoll
25e7849e2b contrib/sockets/sockets.lisp: two more typos fixed (Chun Tian) 2009-10-17 21:41:51 +02:00
Juan Jose Garcia Ripoll
7d0e542de1 contrib/sockets/sockets.lisp: added a new argument to define-sockopt specifying the level of the interface (SOL_SOCKET or IPPROTO_TCP). 2009-10-17 19:55:35 +02:00
Juanjo
25c9b636e1 contrib/sockets/sockets.lisp: remove unused conditionalization. 2009-10-05 11:00:32 +02:00
Juan Jose Garcia Ripoll
61b7c0ac31 Same reverse fix as before. 2009-08-17 21:25:20 +02:00
Juan Jose Garcia Ripoll
7077608d93 Default buffering mode defaults to NIL (:NONE) so that we do not break code expecting no buffering. Change will be undone at some point in the future. 2009-08-17 20:30:35 +02:00
Juan Jose Garcia Ripoll
413b9561cf Two compatibility improvements in the SOCKETS library:
1) The buffer types :FULL and :LINE are supported.
2) We create an alias called SB-BSD-SOCKETS
2009-08-16 10:49:36 +02:00
Juan Jose Garcia Ripoll
94b43077a6 Replace an invalid comment by a more meaningful one. 2009-07-29 12:29:59 +02:00
Juan Jose Garcia Ripoll
144d25367d Instead of replacing all DEFCONSTANT with DEFPARAMETER, use LET statements to prevent evaluation of the c-inline forms in profile, sockets and serve-event 2009-06-29 14:41:04 +02:00
Juan Jose Garcia Ripoll
f6ff6e4ffc Again, DEFCONSTANT statements cannot contain C-INLINE forms. 2009-06-28 21:43:26 +02:00
Juan Jose Garcia Ripoll
ecf055bc5a Fixes for the Windows port, including a flag to make ANSI C streams the default file type. 2009-03-30 14:42:16 +02:00
Juan Jose Garcia Ripoll
af158f819a CLX registers itself with *MODULES* and requires SOCKETS. Split SOCKETS's package definition into a different file so that CLX can load it before being compiled. 2009-02-24 12:45:54 +01:00
Juan Jose Garcia Ripoll
150398b8b1 Extended strings are now arrays of 32-bit integers. 2009-02-07 19:54:34 +01:00
Juan Jose Garcia Ripoll
9cdbb57dbc Better support for external formats, including the :CR, :LF and :CRLF options. 2009-01-02 16:49:01 +01:00
Juan Jose Garcia Ripoll
c9b36e4005 Merged the new_signals branch. 2008-12-23 12:08:29 +01:00
Juan Jose Garcia Ripoll
035d8779b9 trunc() does not exist in Solaris. 2008-12-22 10:12:35 +01:00
Juan Jose Garcia Ripoll
c331bd2630 We do not use stdio any more, but require the close() function. 2008-12-05 13:54:30 +01:00
Juan Jose Garcia Ripoll
b7f0067ae9 New implementation of lisp streams based on a method dispatch table. 2008-10-19 00:00:58 +02:00
Juan Jose Garcia Ripoll
8a3350f180 Protect the socket library with no-interrupt blocks 2008-10-11 00:28:17 +02:00
Juan Jose Garcia Ripoll
4c1bf9322b This header has to be included always. 2008-08-28 21:21:30 +02:00
Juan Jose Garcia Ripoll
ee6ae69aca Fixed typo in the name of a socket option. 2008-08-02 17:28:39 +02:00
Juan Jose Garcia Ripoll
89db1c7d7f Added option TCP_NODELAY 2008-07-31 10:57:40 +02:00