[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 97/119: added ws-stop-all convenience function
From: |
Eric Schulte |
Subject: |
[elpa] 97/119: added ws-stop-all convenience function |
Date: |
Mon, 10 Mar 2014 16:57:52 +0000 |
eschulte pushed a commit to branch master
in repository elpa.
commit c9088f100941ae7abbe45c8e743be6d466e2bedb
Author: Eric Schulte <address@hidden>
Date: Sun Jan 12 09:24:12 2014 -0700
added ws-stop-all convenience function
---
doc/web-server.texi | 6 ++++++
web-server.el | 5 +++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/doc/web-server.texi b/doc/web-server.texi
index 0e2c8e0..e86ff93 100644
--- a/doc/web-server.texi
+++ b/doc/web-server.texi
@@ -395,6 +395,12 @@ servers.
@end example
@end defun
address@hidden
address@hidden ws-stop-all
address@hidden stops all emacs web servers by mapping
address@hidden over @code{ws-servers}.
address@hidden defun
+
@section Convenience Functions
The following convenience functions automate many common tasks
associated with responding to HTTP requests.
diff --git a/web-server.el b/web-server.el
index 944521c..7e713e9 100644
--- a/web-server.el
+++ b/web-server.el
@@ -131,6 +131,11 @@ function.
(mapc #'delete-process (append (mapcar #'process (requests server))
(list (process server)))))
+(defun ws-stop-all ()
+ "Stop all servers in `ws-servers'."
+ (interactive)
+ (mapc #'ws-stop ws-servers))
+
(defvar ws-http-common-methods '(GET HEAD POST PUT DELETE TRACE)
"HTTP methods from http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html.")
- [elpa] 83/119: supports web sockets, (continued)
- [elpa] 83/119: supports web sockets, Eric Schulte, 2014/03/10
- [elpa] 75/119: more web-socket implementation, Eric Schulte, 2014/03/10
- [elpa] 91/119: more tutorial, Eric Schulte, 2014/03/10
- [elpa] 94/119: example serving Org-mode files as JSON, Eric Schulte, 2014/03/10
- [elpa] 93/119: helper function to serve directory listings, Eric Schulte, 2014/03/10
- [elpa] 90/119: tutorials, Eric Schulte, 2014/03/10
- [elpa] 88/119: accept single-function handlers, Eric Schulte, 2014/03/10
- [elpa] 96/119: expand this example w/smart dir listings, Eric Schulte, 2014/03/10
- [elpa] 98/119: TODO chunked encoding, Eric Schulte, 2014/03/10
- [elpa] 99/119: serve files with htmlize Emacs fontification, Eric Schulte, 2014/03/10
- [elpa] 97/119: added ws-stop-all convenience function,
Eric Schulte <=
- [elpa] 89/119: authorization helper, Eric Schulte, 2014/03/10
- [elpa] 92/119: simpler handler in example, Eric Schulte, 2014/03/10
- [elpa] 102/119: updated content- transfer-encoding notes, Eric Schulte, 2014/03/10
- [elpa] 103/119: set Content-length when serving files, Eric Schulte, 2014/03/10
- [elpa] 95/119: better ws-send-directory-list, Eric Schulte, 2014/03/10
- [elpa] 106/119: TODO Content and Transfer encodings, Eric Schulte, 2014/03/10
- [elpa] 104/119: tweak notes, Eric Schulte, 2014/03/10
- [elpa] 108/119: test chunked/gzipped transfer/content encodings, Eric Schulte, 2014/03/10
- [elpa] 100/119: manual application of x-gzip content encoding, Eric Schulte, 2014/03/10
- [elpa] 101/119: manual application of chunked transfer encoding, Eric Schulte, 2014/03/10