3

when I try to send a message as follow:

(let* ((temp-buffer message)
 (out-vector (make-array (length temp-buffer) 
             :element-type'(unsigned-byte 8)
             :initial-contents temp-buffer))
 (s (ccl:make-socket :remote-host host :remote-port port :type :datagram )))
(ccl:send-to s out-vector (length out-vector))
(ccl::close s))

I get the following error:

on #<CCL::UDP-SOCKET #x302000D9FCFD> : 
Socket is already connected (error #56) during sendto

Initially, this code was effective. Could anyone explain this error message and how to solve it. Thanks for any help.

yannics
  • 179
  • 10
  • You could try to post the question on the CCL developer list: [https://lists.clozure.com/mailman/listinfo/openmcl-devel](https://lists.clozure.com/mailman/listinfo/openmcl-devel). – Renzo Apr 24 '16 at 10:07

1 Answers1

3

This seems to work.

(let* ((temp-buffer message)
       (out-vector (make-array (length temp-buffer)
                               :element-type'(unsigned-byte 8)
                               :initial-contents temp-buffer))
       (s (ccl:make-socket :type :datagram)))
  (ccl:send-to s out-vector (length out-vector) :remote-host host :remote-port port)
  (ccl::close s))
sigjuice
  • 28,661
  • 12
  • 68
  • 93