2016-04-24 21 views
3

發送UDP當我嘗試發送郵件如下:問題與CCL

(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 

最初,這個代碼是有效的。 任何人都可以解釋這個錯誤信息以及如何解決它。 感謝您的幫助。

+0

你可以嘗試發佈CCL開發商名單上的問題:[https://lists.clozure.com/mailman/listinfo/openmcl-devel](https://lists.clozure.com/mailman /列表信息/ openmcl-devel的)。 – Renzo

回答

3

這似乎工作。

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

是的,現在它工作。謝謝。 – yannics