We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
read
When using read-line and write-line it seems to work:
read-line
write-line
(let ((path "/tmp/foo.socket")) (unwind-protect (iolib:with-open-socket (s :address-family :local :connect :passive :local-filename (uiop:native-namestring path)) (iolib:with-accept-connection (conn s) (values (read-line conn) (progn (write-line "result" conn))))) (uiop:delete-file-if-exists path))) ;; Other REPL (iolib:with-open-socket (s :address-family :local :remote-filename (uiop:native-namestring "/tmp/foo.socket")) (write-line "foo" s) (finish-output s) (read-line s))
Now switch to read and write:
write
(let ((path "/tmp/foo.socket")) (unwind-protect (iolib:with-open-socket (s :address-family :local :connect :passive :local-filename (uiop:native-namestring path)) (iolib:with-accept-connection (conn s) (values (read conn) (progn (write "result" :stream conn))))) (uiop:delete-file-if-exists path))) ;; Other REPL (iolib:with-open-socket (s :address-family :local :remote-filename (uiop:native-namestring "/tmp/foo.socket")) (write "foo" :stream s) (finish-output s) (read s))
It hangs forever.
Bug?
The text was updated successfully, but these errors were encountered:
IOLIB/SOCKETS
If the goal is to send a single message from the client to the server over a local socket, then the following seems to work as intended:
;; server (let ((path "/tmp/foo.socket")) (unwind-protect (iolib:with-open-socket (s :address-family :local :connect :passive :local-filename path) (iolib:with-accept-connection (connection s) (write (read connection)) nil)) (uiop:delete-file-if-exists path)))
;; client (iolib:with-open-socket (s :address-family :local :remote-filename "/tmp/foo.socket") (write "foo" :stream s) nil)
@sionescu I think the issue can be closed.
Sorry, something went wrong.
No branches or pull requests
When using
read-line
andwrite-line
it seems to work:Now switch to
read
andwrite
:It hangs forever.
Bug?
The text was updated successfully, but these errors were encountered: