From 5f2cf49897c5d0c2ba31adecf554e90060ab1d1b Mon Sep 17 00:00:00 2001 From: "Chun Tian (binghe)" Date: Wed, 26 Oct 2016 18:57:24 +0200 Subject: [PATCH 1/2] [test] fixed loading of USOCKET-TEST --- usocket-test.asd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usocket-test.asd b/usocket-test.asd index 4c2edac..ddb989c 100644 --- a/usocket-test.asd +++ b/usocket-test.asd @@ -11,7 +11,7 @@ :version "0.2.0" :licence "MIT" :description "Tests for usocket" - :depends-on (:usocket + :depends-on (:usocket-server :rt) :components ((:module "test" :serial t From f520a8e03dc9686a0ceac17edfe59de87b32fa77 Mon Sep 17 00:00:00 2001 From: "Chun Tian (binghe)" Date: Wed, 26 Oct 2016 19:21:11 +0200 Subject: [PATCH 2/2] Put server exported symbols back to package.lisp; usocket 0.7.0.1 --- package.lisp | 6 +++++- server.lisp | 11 ++--------- usocket-server.asd | 2 +- usocket.asd | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.lisp b/package.lisp index 4d4cf9a..ca66ff3 100644 --- a/package.lisp +++ b/package.lisp @@ -83,4 +83,8 @@ #:insufficient-implementation ; conditions regarding usocket support level #:unsupported - #:unimplemented)) + #:unimplemented + + #:socket-server + #:*remote-host* + #:*remote-port*)) diff --git a/server.lisp b/server.lisp index fe764ce..93b1bf4 100644 --- a/server.lisp +++ b/server.lisp @@ -1,12 +1,5 @@ (in-package :usocket) -(eval-when (:compile-toplevel :load-toplevel :execute) - (use-package :portable-threads) - - (export '(socket-server - *remote-host* - *remote-port*))) - (defun socket-server (host port function &optional arguments &key in-new-thread (protocol :stream) ;; for udp @@ -36,7 +29,7 @@ :timeout timeout :max-buffer-size max-buffer-size))))) (if in-new-thread - (values (spawn-thread (or name "USOCKET Server") #'real-call) socket) + (values (portable-threads:spawn-thread (or name "USOCKET Server") #'real-call) socket) (real-call))))) (defvar *remote-host*) @@ -102,7 +95,7 @@ `(,socket ,@(when element-type `(:element-type ,element-type))))) (client-stream (socket-stream client-socket))) (if multi-threading - (apply #'spawn-thread "USOCKET Client" real-function client-socket arguments) + (apply #'portable-threads:spawn-thread "USOCKET Client" real-function client-socket arguments) (prog1 (apply real-function client-socket arguments) (close client-stream) (socket-close client-socket))) diff --git a/usocket-server.asd b/usocket-server.asd index c9e130b..c179d71 100644 --- a/usocket-server.asd +++ b/usocket-server.asd @@ -7,7 +7,7 @@ (defsystem usocket-server :name "usocket (server)" :author "Chun Tian (binghe)" - :version "0.7.0" + :version "0.7.0.1" :licence "MIT" :description "Universal socket library for Common Lisp (server side)" :depends-on (:usocket :portable-threads) diff --git a/usocket.asd b/usocket.asd index 7947a0f..292ce7d 100644 --- a/usocket.asd +++ b/usocket.asd @@ -8,7 +8,7 @@ :name "usocket (client)" :author "Erik Enge & Erik Huelsmann" :maintainer "Chun Tian (binghe) & Hans Huebner" - :version "0.7.0" + :version "0.7.0.1" :licence "MIT" :description "Universal socket library for Common Lisp" :depends-on (#+(or sbcl ecl) :sb-bsd-sockets