Skip to content
New issue

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

Netcat cannot communicate with the socket #1

Open
jefferson-julio opened this issue Nov 23, 2020 · 0 comments
Open

Netcat cannot communicate with the socket #1

jefferson-julio opened this issue Nov 23, 2020 · 0 comments

Comments

@jefferson-julio
Copy link

When I tried to echo a string into the socket via netcat, the cl-sipc:hook couldn't catch the message.

I used:

echo "test" | nc -U /tmp/sipc.socket

On my server:

(defparameter rc
            (cl-sipc:hook
              socketf
              #'(lambda (err)
                  (format t "err: ~a~%" err)
                  (force-output)
                  t)
              #'(lambda (tipo mensagem)
                  (sipc:respond (format nil "olá o/~%"))
                  (format t "~a ~a~%" tipo mensagem)
                  t)))

When I exit netcat with Control+C, the Lisp code prints "err: CLOSED" though, indicating that the connection somehow occurred, but the library didn't catch the message.

When I send the same message via the library funcion cl-sipc:send-quick, it works, the message is printed and a response is sended, but through netcat, don't. I also tried doing the same with socat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant