IO
==

## nodeca.io.on(event, handler)

Regster `handler` for given io `event`.

``` javascript
nodeca.io.on('rpc:version-mismatch', function (versions) {
  alert('Versions mismatch. Server is' + versions.server +
        ' and client is ' + versions.client);
});
```


#### Known events

- `rpc:version-mismatch`


## nodeca.io.off(event[, handler])

Unregister `handler` (or all handlers if it wasn't given) for an `event`.


## nodeca.io.apiTree(data[, options][, callback])

``` javascript
nodeca.io.apiTree(params, {timeout: 15}, function (err, res) {
  // handle err/response
});
```


### Communication protocol

Client sends a message to the _requests_ channel with following structure:

    id:           <Number>    Request ID. Generated by client.
    msg:
      version:    <String>    Application version.
      method:     <String>    Server method name. E.g. 'nodeca.server.foobar'
      params:     <Mixed>     Parameters object given to `nodeca.server.*` method.

Once server executed request it will publish a message to the _responses_
channel with following structure:

    id:           <Number>    Original request ID.
    msg:
      version:    <String>    Application version.
      error:      <String>    An error if any.
      result:     <Mixed>     Server response.

IO
==

## nodeca.io.apiTree(data[, options][, callback])

``` javascript
nodeca.io.apiTree(params, {timeout: 15}, function (err, res) {
  // handle err/response
});
```


### RPC Communication protocol

Client sends a message to the _requests_ channel with following structure:

    id:           <Number>    Request ID. Generated by client.
    msg:
      version:    <String>    Application version.
      method:     <String>    Server method name. E.g. 'nodeca.server.foobar'
      params:     <Mixed>     Parameters object given to `nodeca.server.*` method.

Once server executed request it will publish a message to the _responses_
channel with following structure:

    id:           <Number>    Original request ID.
    msg:
      version:    <String>    Application version.
      error:      <String>    An error if any.
      result:     <Mixed>     Server response.

Remove events support info from IO
Remove events support info from IO
