From: Stelian Ionescu Date: Mon, 14 Oct 2013 15:11:09 +0000 (+0200) Subject: Modify the ping example to wait for the reply X-Git-Tag: v0.8.1~48 X-Git-Url: https://repo.or.cz/w/iolib.git/commitdiff_plain/86db40320e767af50c84b9d82e4ae0481c8086c3 Modify the ping example to wait for the reply --- diff --git a/extras/ping.lisp b/extras/ping.lisp index c4dd51f..9040252 100644 --- a/extras/ping.lisp +++ b/extras/ping.lisp @@ -59,4 +59,6 @@ (write-ip-header ip-header frame-size (dotted-to-integer target)) (setf (mem-ref payload :uint32) (htonl #x1A2B3C4D)) (write-icmp-header icmp-header icmp-packet-size id seqno) - (send-to socket frame :end frame-size :remote-host target)))))) + (send-to socket frame :end frame-size :remote-host target) + (iolib/multiplex:wait-until-fd-ready (socket-os-fd socket) :input) + (receive-from socket :size (* 64 1024)))))))