Skip to content

Commit

Permalink
Broadcast sample README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlopez committed Apr 28, 2013
1 parent caf4a36 commit ec39dc3
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions samples/Broadcast/README.md
@@ -0,0 +1,45 @@
# Broadcast sample

One server broadcasting message to n client. Each client sends a message to
the server.

## Installation

```
npm install
```

## Run

Start the server in a console:

```
node server
```

Options:
- `-p <port>`, `--port <port>`: Port to listen. Default value: 3000

Start a client in a console
```
node client
```

Options:
- `-h <host>`, `--host <host>`: Server host. Default value: localhost
- `-p <port>`, `--port <port>`: Server port. Default value: 3000
- `-t <timeout>`, `--timeout <timeout>`: Timeout between message, in milliseconds. Default value: 1000
- `<message>`: Message to send. Default value: `Hello world`

Examples:
```
node client hi
node client -p 3000 -h localhost hi
node client --timeout 2000 hi
```



(Thanks to [JSON5](https://github.com/aseemk/json5) by [aseemk](https://github.com/aseemk).
This file is based on that project README.md).

0 comments on commit ec39dc3

Please sign in to comment.