Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 5 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
8 ChangeLog
@@ -76,6 +76,14 @@
* distro/archlinux/rc.d/webrocket: created an init script for arch linux
* webrocket/: backend proto fixes and optimization
+2012-01-23 Pablo Astigarraga <pote@tardis.com.uy>
+
+ * webrocket/backend_endpoint.go: Minor language changes, some trailing characters, etc.
+ * webrocket/backend_connection.go: Minor nipticks and a trailing character.
+ * webrocket/admin_endpoint.go: Several typos.
+ * webrocket/README: Minor change in grammar.
+ * webrocket-server/README: minor grammar change.
+
2012-01-19 Krzysztof Kowalik <chris@nu7hat.ch>
* docs/webrocket-server.1.txt: updated docs
View
4 cmd/webrocket-server/README
@@ -1,7 +1,7 @@
The `webrocket-server` tool
===========================
-This tool is used to start and initially configure single node instance.
+This tool is used to start and initially configure a single node instance.
To further configure your node, use the *webrocket-admin*(1) tool.
-Check manual pages for the *webrocket-server*(1) to get more information.
+Check manual pages for the *webrocket-server*(1) to get more information.
View
6 pkg/webrocket/admin_endpoint.go
@@ -32,7 +32,7 @@ func adminStatusLog(a *AdminEndpoint, msg string) {
a.log.Printf("admin: %s", msg)
}
-// Helper for logging protocol errors and and seding it to
+// Helper for logging protocol errors and sending them to
// the client.
func adminError(a *AdminEndpoint, error string) {
adminStatusLog(a, "Error; "+error)
@@ -77,7 +77,7 @@ func (a *AdminEndpoint) Kill() {
a.alive = false
}
-// Extendended http.Server.ListenAndServe funcion.
+// Extendended http.Server.ListenAndServe function.
func (a *AdminEndpoint) ListenAndServe() error {
addr := a.Server.Addr
if addr == "" {
@@ -91,7 +91,7 @@ func (a *AdminEndpoint) ListenAndServe() error {
return a.Server.Serve(l)
}
-// Extendended http.Server.ListenAndServeTLS funcion.
+// Extendended http.Server.ListenAndServeTLS function.
func (a *AdminEndpoint) ListenAndServeTLS(certFile, certKey string) error {
addr := a.Server.Addr
if addr == "" {
View
14 pkg/webrocket/backend_connection.go
@@ -20,12 +20,12 @@ type backendConnection struct {
// Internal constructor
// -----------------------------------------------------------------------------
-// newBackendConnection wrapps given connection into new backend connection
+// newBackendConnection wrapps the given connection into a new backend connection
// object.
//
// conn - The connection to be wrapped.
//
-// Returns new backend connection.
+// Returns a new backend connection.
func newBackendConnection(conn net.Conn) *backendConnection {
return &backendConnection{conn: conn}
}
@@ -33,9 +33,9 @@ func newBackendConnection(conn net.Conn) *backendConnection {
// Exported
// -----------------------------------------------------------------------------
-// Recv receives the data from the underlaying connection and maps it to
-// the backend request structure. If there's no data to read it shall block
-// until new data will appear.
+// Recv receives data from the underlaying connection and maps it to
+// the backend request structure. If there's no data to read it will block
+// until new data appears.
//
// Returns read request or an error if something went wrong.
func (c *backendConnection) Recv() (req *backendRequest, err error) {
@@ -87,8 +87,8 @@ func (c *backendConnection) Recv() (req *backendRequest, err error) {
// Send packs the command and frames together and sends it to the client.
//
-// cmd - The command to be send.
-// frames - The frames to be send.
+// cmd - The command to be sent.
+// frames - The frames to be sent.
//
// Returns an error if something went wrong.
func (c *backendConnection) Send(cmd string, frames ...string) (err error) {
View
12 pkg/webrocket/backend_endpoint.go
@@ -73,7 +73,7 @@ func newBackendEndpoint(ctx *Context, addr string) *BackendEndpoint {
// -----------------------------------------------------------------------------
// registerVhost registers a new handler for the specified vhost. Not
-// threadsafe, called only from the context's addVhost function.
+// threadsafe, called only from the context's addVhost function.
//
// vhost - The vhost to be registered.
//
@@ -114,13 +114,13 @@ func (b *BackendEndpoint) serve() (err error) {
return
}
-// authenticate Checks if the worker's identity is valid to access to the
+// authenticate checks if the worker's identity has access to the
// specified vhost.
//
// rawIdentity - The identity line to be parsed and authorized.
//
// If identity is approved, then returns in order: vhost to which worker is
-// connected, its identity representation and boolean status.
+// connected, its identity representation and boolean status.
func (b *BackendEndpoint) authenticate(rawIdentity string) (vhost *Vhost,
idty *backendIdentity, ok bool) {
var err error
@@ -178,11 +178,11 @@ log:
// dispatchDealer handles a request received from the dealer socket.
//
-// vhost - The vhost to which message has been sent.
+// vhost - The vhost to which the message has been sent.
// req - The request to be handled.
// idty - The sender's identity.
//
-// Returns a status message and code.
+// Returns a status message and code.
func (b *BackendEndpoint) dispatchDealer(vhost *Vhost, req *backendRequest,
idty *backendIdentity) *Status {
if vhost.lobby == nil {
@@ -415,7 +415,7 @@ func (b *BackendEndpoint) Trigger(vhost *Vhost, payload interface{}) error {
return nil
}
-// ListenAndServe setups endpoint's TCP listener for handling incomig
+// ListenAndServe setups endpoint's TCP listener for handling incoming
// backend worker's and client's connections.
func (b *BackendEndpoint) ListenAndServe() (err error) {
addr, err := net.ResolveTCPAddr("tcp", b.addr)

No commit comments for this range

Something went wrong with that request. Please try again.