The symlinked libsipc.so will resolve after the ffi library is built and the package will work in this directory (the symlink is to libsipc/libsipc-ffi.so)
Additionally you can run `sudo make install-ffi' to make it work system-wide (installed to /usr/lib/libsipc.so) (`sudo make uninstall-ffi' to remove it)
sipc:timeout(socket sec) ;; Set read timeout (in seconds) to socket. (if value is NIL, nothing happens, if value is 0, set to infinite). (note: when something fails timeout it sends error :MESSAGE (invalid message).
;; start listening on `socket'. error-callback should be in format (lambda (error) ...). message-callback should be in format (lambda (type message )...).
;; available errors are:
; :accept - There was an error accepting the connection
; :read - There was an error reading the message
; :closed - The connection was closed before a message could be read
; :message - The message was invalid or outside the acceptable size bounds (TODO make this runtime instead of compile-time constant)
;; there are also ignorable/recoverable errors, which are sent to the error callback as suck '(:warning <error name>). These are treated differently. If the error callback returns T, let the message be carried on. If the error callback returns NIL, discard it. Available ones are:
; (:warning :checksum) - The message had no checksum. (note: if this is not allowed to pass then :CHECKSUM error is raised).
sipc:respond(message value &optional type) ;; send response (note: only valid when handling message) works the same as send() (see below) with additional error responses:
;; t - success
;; :response-disabled - SI_NORESP flag was set
;; :response-invalid - this message cannnot be responded to like this
;; :response-multi - a response has already been sent
;; Bind socket from `socket-filename' to new lexical variable `socket-name' and run (progn @body), then relase the socket afterwards. If the socket fails to bind, return nil and do not attempt to execute body.
;; Add `:connect' after socket-filename to connect instead of binding.
;client functions
sipc:connect(file) ;; connect to socket `file', returns sd on success, nil on failure.
sipc:send(sd value &ptional type (keep-response t)) ;; send `value' to socket `sd' (optionally specify type (see above types), default :string). returns the response if one was sent, or t if keep-response if nil or the server did not send one.
Run `sudo make install' to install ffi library system-wide and attempt to symlink to ~/quicklisp/local-projects/cl-sipc (if it exists). Or run `sudo make install-ffi' to just install the library. (note: you can run `make install' without sudo, in which case it will just attempt to symlink and not install the library. the same is true for `make uninstall'.)
-> sudo make install ;; install ffi systemwide and symlink
-> make install ;; only symlink
-> sudo make install-ffi ;; insall only ffi
-> sudo make uninstall ;; uninstall ffi systemwide and remove symlink