【问题标题】:Problems sending UDP with CCL使用 CCL 发送 UDP 时出现问题
【发布时间】:2016-08-17 12:31:00
【问题描述】:

当我尝试发送如下消息时:

(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))

我收到以下错误:

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

最初,此代码是有效的。 谁能解释这个错误信息以及如何解决它。 感谢您的帮助。

【问题讨论】:

标签: sockets udp common-lisp ccl


【解决方案1】:

这似乎有效。

(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))

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-07-24
    • 2021-03-21
    • 2012-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-28
    相关资源
    最近更新 更多