Permalink
Browse files

updated the webrocket-server man page

  • Loading branch information...
1 parent 9fbd823 commit 9e5bb5e23bf8b369513c94a63886bafae10bcf21 @nu7hatch committed Jan 20, 2012
Showing with 38 additions and 103 deletions.
  1. +1 −0 ChangeLog
  2. +2 −4 docs/Makefile
  3. +34 −27 docs/webrocket-server.1.txt
  4. +0 −71 docs/webrocket.3.txt
  5. +1 −1 webrocket-server/main.go
View
1 ChangeLog
@@ -1,5 +1,6 @@
2012-01-19 Krzysztof Kowalik <chris@nu7hat.ch>
+ * docs/webrocket-server.1.txt: updated docs
* webrocket/: various fixes
* webrocket/webrocket_integration_test.go: added integration tests for websocket proto and backend req
* webrocket-admin/: formatting fixes
View
6 docs/Makefile
@@ -7,10 +7,8 @@ DOCS_MAN1 = \
DOCS_MAN1_HTML = \
webrocket-server.1.html
-DOCS_MAN3 = \
- webrocket.3
-DOCS_MAN3_HTML = \
- webrocket.3.html
+DOCS_MAN3 =
+DOCS_MAN3_HTML =
all: man
clean: clean-man
View
61 docs/webrocket-server.1.txt
@@ -7,33 +7,36 @@ webrocket-server - Start and preconfigure server node instance
SYNOPSIS
--------
-*webrocket-server* [-websocket-host '<host>'] [-websocket-port '<port>']
- [-backend-host '<host>'] [-backend-port '<port>']
- [-cert '<path>'] [-key '<path>']
+*webrocket-server* [-websocket-addr '<addr>'] [-backend-addr '<addr>']
+ [-admin-addr '<addr>'] [-storage-dir '<path>']
+ [-node-name '<name>'] [-cert '<path>'] [-key '<path>']
DESCRIPTION
-----------
The *webrocket-server*(1) tool is used to start and initially configure single
-node instance. To further configure your node, use the *webrocket-ctl*(1) tool.
+node instance. To further configure your node, use the *webrocket-admin*(1) tool.
OPTIONS
-------
-*-websocket-host*='<host>'::
- WebSocket endpoint will be bound with the specified interface.
- By defult endpoint is bound to all interfaces.
-
-*-websocket-port*='<port>'::
- WebSocket endpoint will listen on the specified port.
- Default: 8080.
-
-*-backend-host*='<host>'::
- Backend endpoint will be bound with the specified interface.
- By default endpoitn is bound to all interfaces.
-
-*-backend-port*='<port>'::
- Backend endpoint will listen on the specified port.
- Default: 8081.
-
+*-websocket-addr*='<addr>'::
+ The WebSocket endpoint will be bound with the specified interface.
+ By default endpoint is bound to 127.0.0.1:8080.
+
+*-backend-addr*='<addr>'::
+ The backend endpoint will be bound with the specified interface.
+ By default endpoint is bound to 127.0.0.1:8081.
+
+*-backend-addr*='<addr>'::
+ The admin endpoint will be bound with the specified interface.
+ By default endpoint is bound to 127.0.0.1:8082.
+
+*-storage-dir*='<path>'::
+ A path to the storage directory. Default: /var/lib/webrocket.
+
+*-node-name*='<name>'::
+ The name of this node. By default a result of the `uname -n`
+ command is used.
+
*-cert*='<path>'::
Path to TLS certificate file.
@@ -42,23 +45,27 @@ OPTIONS
EXAMPLES
--------
-Specifying hosts and ports for the endpoints:
+Specifying different addresses of the endpoints:
+
+ $ webrocket-server -backend=:8772 -websocket=myhost.com:80
+ $ webrocket-server -admin=localhost:8082
- $ webrocket-server -backend-port=8772 -backend-host=myhost.com
- $ webrocket-server -websocket-port=8773
+Using custom storage directory:
-Starting the server with TLS support enabled:
+ $ webrocket-server -storage-dir=~/webrocket
- $ webrocket-server -cert "~/my-cert.pem" -key "~/my-key.pem"
+Changing the node name:
+ $ webrocket-server -node-name=abyss
+
SEE ALSO
--------
-link:webrocket-ctl.1.html[*webrocket-ctl*(1)],
+link:webrocket-admin.1.html[*webrocket-admin*(1)],
link:webrocket-monitor.1.html[*webrocket-monitor*(1)]
AUTHOR
------
-Chris Kowalik <chris@nu7hat.ch>
+Krzysztof Kowalik <chris@nu7hat.ch>
COPYRIGHT
---------
View
71 docs/webrocket.3.txt
@@ -1,71 +0,0 @@
-webrocket(3)
-============
-
-NAME
-----
-webrocket - The core library for webrocket tools
-
-SYNOPSIS
---------
- import "webrocket"
-
-DESCRIPTION
------------
-The *webrocket*(3) is a base library for all other webrocket tools.
-It provides functionality to build full stack application listening
-on WebSocket and Backend endpoints. Check its documentation to get
-more information and knowledge.
-
-EXAMPLES
---------
-A trivial example app:
-
------
-package main
-
-import (
- "webrocket"
- "os/signal"
-)
-
-func main() {
- ctx := webrocket.NewContext()
- v, _ := ctx.AddVhost("/example")
- v.OpenChannel("example")
-
- websocket := ctx.NewWebsocketEndpoint("", 8080)
- go websocket.ListenAndServe()
-
- backend := ctx.NewBackendEndpoint("", 8081)
- go backend.ListenAndServe()
-
- <-signal.Incoming
-}
------
-
-SEE ALSO
---------
-link:webrocket-server.1.html[*webrocket-server*(1)],
-link:webrocket-ctl.1.html[*webrocket-ctl*(1)],
-link:webrocket-monitor.1.html[*webrocket-monitor*(1)]
-
-AUTHOR
-------
-Chris Kowalik <chris@nu7hat.ch>
-
-COPYRIGHT
----------
-Copyright (C) 2011 by Krzysztof Kowalik <chris@nu7hat.ch>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
View
2 webrocket-server/main.go
@@ -155,8 +155,8 @@ func DisplaySystemSettings() {
fmt.Printf("Node : %s\n", ctx.NodeName())
fmt.Printf("Cookie : %s\n", ctx.Cookie())
fmt.Printf("Data store dir : %s\n", ctx.StorageDir())
- fmt.Printf("Backend endpoint : tcp://%s\n", conf.Backend)
fmt.Printf("Websocket endpoint : ws://%s\n", conf.Websocket)
+ fmt.Printf("Backend endpoint : wr://%s\n", conf.Backend)
fmt.Printf("Admin endpoint : http://%s\n", conf.Admin)
}

0 comments on commit 9e5bb5e

Please sign in to comment.