Skip to content

Commit

Permalink
1.1.2: Minor documentation formatting revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan7g committed Dec 26, 2018
1 parent 7147b03 commit 8948dac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ const sanFrancisco = citySchema.parse(sanFranciscoBuf)
`sanFrancisco` will be similar to the object we built `sanFranciscoBuf` from. It will have an array of building objects.


### Utilizing StreamingAbstractor
## Utilizing StreamingAbstractor

StreamingAbstractors allow us to create duplex, event-based streaming systems for applications.
`StreamingAbstractor`s allow us to create duplex, event-based streaming systems for applications.

Let's create a StreamingAbstractor.
Let's create a `StreamingAbstractor`.

```js
const myAbstractor = new StreamingAbstractor()
Expand All @@ -148,19 +148,19 @@ myAbstractor.register('login', new Schema([
]))
```

Above we've registered an event called 'login' in our abstractor. Now it can recieve login events from a stream connected to another StreamingAbstractor.
Above we've registered an event called 'login' in our abstractor. Now it can recieve login events from a stream connected to another `StreamingAbstractor`.

#### Recieving Events Through StreamingAbstractor
### Recieving Events Through StreamingAbstractor

Now that we have a StreamingAbstractor (`myAbstractor`) with the `login` event registered, we'll listen for `login` on our end.
Now that we have a `StreamingAbstractor` (`myAbstractor`) with the `login` event registered, we'll listen for `login` on our end.

```js
myAbstractor.on('login', (data) => {
console.log('Login with username ' + data.username + ' and number ' + data.number + '.')
})
```

#### Sending Events Through StreamingAbstractor
### Sending Events Through StreamingAbstractor

Because we've registered the `login` event, we can send `login` events using `myAbstractor`.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protocore",
"version": "1.1.1",
"version": "1.1.2",
"description": "Specify and deploy custom binary protocol structures in Node",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 8948dac

Please sign in to comment.