[usocket-cvs] r466 - usocket/branches/experimental-udp

Chun Tian (binghe) ctian at common-lisp.net
Tue Oct 28 06:47:42 UTC 2008


Author: ctian
Date: Tue Oct 28 06:47:42 2008
New Revision: 466

Log:
[udp] more code change to match the API change on SOCKET-SEND

Modified:
   usocket/branches/experimental-udp/rtt-client.lisp
   usocket/branches/experimental-udp/server.lisp

Modified: usocket/branches/experimental-udp/rtt-client.lisp
==============================================================================
--- usocket/branches/experimental-udp/rtt-client.lisp	(original)
+++ usocket/branches/experimental-udp/rtt-client.lisp	Tue Oct 28 06:47:42 2008
@@ -5,7 +5,7 @@
 
 (defun default-rtt-function (message) (values message 0))
 
-(defmethod socket-sync ((socket datagram-usocket) message &key address port
+(defmethod socket-sync ((socket datagram-usocket) message &key host port
                         (max-receive-length +max-datagram-packet-size+)
                         (encode-function #'default-rtt-function)
                         (decode-function #'default-rtt-function))
@@ -18,7 +18,7 @@
 	 and recv-seq = -1
 	 and continue-p = t
 	 do (progn
-	      (socket-send socket data data-length :address address :port port)
+	      (socket-send socket data data-length :host host :port port)
 	      (multiple-value-bind (sockets real-time)
 		  (wait-for-input socket :timeout (rtt-start socket))
 		(declare (ignore sockets))

Modified: usocket/branches/experimental-udp/server.lisp
==============================================================================
--- usocket/branches/experimental-udp/server.lisp	(original)
+++ usocket/branches/experimental-udp/server.lisp	Tue Oct 28 06:47:42 2008
@@ -12,8 +12,7 @@
   (let ((socket (socket-connect nil nil
 				:protocol :datagram
 				:local-host host
-				:local-port port
-				:element-type element-type))
+				:local-port port))
         (buffer (make-array max-buffer-size
                             :element-type '(unsigned-byte 8)
                             :initial-element 0)))
@@ -34,7 +33,7 @@
                               (when reply
                                 (replace buffer reply)
                                 (let ((n (socket-send socket buffer (length reply)
-                                                      :address *remote-host*
+                                                      :host *remote-host*
                                                       :port *remote-port*)))
                                   (when (minusp n)
                                     (error "send error: ~A~%" n))))))




More information about the usocket-cvs mailing list