From 05aee16e2478582efc35f0d834bb2ded5aada062 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 10 May 2019 13:29:45 +0200 Subject: [PATCH] Remove useless file --- server/server-example.lisp | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 server/server-example.lisp diff --git a/server/server-example.lisp b/server/server-example.lisp deleted file mode 100644 index c9a131b..0000000 --- a/server/server-example.lisp +++ /dev/null @@ -1,34 +0,0 @@ -(ql:quickload "usocket") -(ql:quickload "babel") - - -(defparameter buf (make-array 10 - :element-type '(unsigned-byte 8) - :adjustable nil - :fill-pointer nil - :displaced-to nil - :initial-element 0)) - ;(defparameter s (usocket:socket-listen "localhost" 8080)) - -(defparameter su (usocket:socket-connect nil nil :protocol :datagram :local-host "localhost" :local-port 8080)) - -;; (defun display-buf (buf) -;; (let* ((message (flexi-streams:octets-to-string buf :external-format :utf-8 :end 10)) -;; (trimmed-message (trim message))) -;; (format t "~a" trimmed-message))) - - - -(defun process (sock) - (multiple-value-bind (recv size remote-host remote-port) - (usocket:socket-receive su buf 10) - (format t "~a" (babel:octets-to-string buf :encoding :utf-8)) - (usocket:socket-send sock buf 10 :host remote-host :port remote-port))) - - - - -(defun again () - (loop - (loop for sock in (usocket:wait-for-input `(,su) :ready-only t) - do (process sock))))