Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gendl
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
45
Issues
45
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
gendl
gendl
Commits
84151182
Commit
84151182
authored
Sep 28, 2017
by
Gail Zacharias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add server-port function and use it
parent
3ecc4eba
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
9 deletions
+13
-9
gwl/gwl-session/source/functions.lisp
gwl/gwl-session/source/functions.lisp
+2
-2
gwl/source/base-html-sheet.lisp
gwl/source/base-html-sheet.lisp
+1
-1
gwl/source/cookies/base-html-sheet.lisp
gwl/source/cookies/base-html-sheet.lisp
+1
-1
gwl/source/log-utils.lisp
gwl/source/log-utils.lisp
+1
-1
gwl/source/remote-object.lisp
gwl/source/remote-object.lisp
+1
-3
gwl/source/utilities.lisp
gwl/source/utilities.lisp
+7
-1
No files found.
gwl/gwl-session/source/functions.lisp
View file @
84151182
...
...
@@ -37,8 +37,8 @@
;; any new requests while all this is happening...
;;
(
glisp:w-o-interrupts
(
let
((
port
(
s
lot-value
(
wserver-socket
*wserver*
)
'socket::local
-port
)))
(
when
(
>=
port
1000
)
(
let
((
port
(
s
erver
-port
)))
(
when
(
and
port
(
>=
port
1000
)
)
(
net.aserve:shutdown
)
(
net.aserve:start
:port
port
:listeners
listeners
)))
(
mapc
#'
funcall
(
ensure-list
extra-functions
))
...
...
gwl/source/base-html-sheet.lisp
View file @
84151182
...
...
@@ -169,7 +169,7 @@ the browser in development mode). Defaults to NIL (the empty list)."
;;
(
full-url
(
when
*wserver*
(
format
nil
"http://localhost:~a~a"
(
s
ocket:local-port
(
net.aserve:wserver-socket
net.aserve:*wserver*
)
)
(
s
erver-port
)
(
the
url
))))
(
"String. The web address in the current session which points at this page. Published on demand."
...
...
gwl/source/cookies/base-html-sheet.lisp
View file @
84151182
...
...
@@ -166,7 +166,7 @@ the browser in development mode). Defaults to NIL (the empty list)."
;;
(
full-url
(
when
*wserver*
(
format
nil
"http://localhost:~a~a"
(
s
ocket:local-port
(
net.aserve:wserver-socket
net.aserve:*wserver*
)
)
(
s
erver-socket
)
(
the
url
))))
(
"String. The web address in the current session which points at this page. Published on demand."
...
...
gwl/source/log-utils.lisp
View file @
84151182
...
...
@@ -32,7 +32,7 @@
(
setq
*log-file*
(
format
nil
"/home/dcooper8/kitchen/logs-~a-~a.lisp"
(
gwl::iso-time
(
get-universal-time
))
(
s
lot-value
(
slot-value
server
'net.aserve::socket
)
'socket::local-port
)))
(
s
erver-port
server
)))
(
glisp:process-run-function
"log-maker"
#'
(
lambda
()
...
...
gwl/source/remote-object.lisp
View file @
84151182
...
...
@@ -291,9 +291,7 @@
:type
(
format
nil
"~s"
(
the-object
item
type
))
:root-path
(
the-object
item
root-path
)
:host
(
or
*request-server-ipaddr*
:unknown
)
:port
(
glisp:local-port
(
slot-value
(
symbol-value
(
read-from-string
"net.aserve:*wserver*"
))
(
read-from-string
"net.aserve::socket"
)))))
:port
(
server-port
)))
(
defmethod
print-object
((
object
remote-object
)
stream
)
...
...
gwl/source/utilities.lisp
View file @
84151182
...
...
@@ -31,7 +31,13 @@ A warning is given if an error condition occurs with <b>body</b>.
`
(
,
(
glisp:with-timeout-sym
)
(
,
timeout
,
timeout-body
)
,
code
)
code
)))))))
(
defun
server-port
(
&optional
(
wserver
net.aserve:*wserver*
))
(
when
wserver
(
let
((
socket
(
net.aserve:wserver-socket
wserver
)))
(
when
socket
(
glisp:local-port
socket
)))))
(
defun
announce-server-port
()
(
let
((
port
(
glisp:local-port
(
slot-value
net.aserve:*wserver*
'net.aserve::socket
)
)))
(
let
((
port
(
server-port
)))
(
when
port
(
format
t
"~&~%***** ~%Your Webserver is running on Port ~a.~%*****~%"
port
))))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment