Skip to content

Commit

Permalink
Put server exported symbols back to package.lisp; usocket 0.7.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
binghe committed Oct 26, 2016
1 parent 5f2cf49 commit f520a8e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
6 changes: 5 additions & 1 deletion package.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@

#:insufficient-implementation ; conditions regarding usocket support level
#:unsupported
#:unimplemented))
#:unimplemented

#:socket-server
#:*remote-host*
#:*remote-port*))
11 changes: 2 additions & 9 deletions server.lisp
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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*)
Expand Down Expand Up @@ -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)))
Expand Down
2 changes: 1 addition & 1 deletion usocket-server.asd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion usocket.asd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f520a8e

Please sign in to comment.