Sha256: fc87d8a12bbf6a025807df225e2f38298ee7ad2549cce0d6537f7f2a46446ab3

Contents?: true

Size: 1.3 KB

Versions: 21

Compression:

Stored size: 1.3 KB

Contents

#Interactive

##Pipes
###Starting pipes
  * Client (Driver/Platform)
    * `cd ./app/drivers/$PLATFORM/; rake pipe` *or* `cd ./; rake pipe:driver PLATFORM=$PLATFORM`
  * Server
    * `cd ./; rake pipe:server PLATFORM=$PLATFORM`

###What $stdout and $stdin does for pipes

  * Server
  	- `$stdin` => `int_dispatch`
  	- `if_dispatch` => `$stdout`
  * Client
  	- `$stdin` => `if_dispatch`
  	- `int_dispatch` => `$stdout`
  
All communication *coming* from `$stdin` and *going* to `$stdout` is in un-escaped JSON formatting that follows the conventions mentioned in [Messaging](./messaging.md).

The test suites assume particular behavior of the pipes. Please review [./spec/env/iface.rb](../spec/env/iface.rb) for the method named `pipe_suite` for the proper behavior.

####Examples

#####Server ➜ Client
 1. **Server** calls `if_disptatch([[0, 0, 'hello']])` (**The additional 0 at the beginning is the queue, 0 in this case is the main queue**)
 2. **Server** `$stdout` *writes* `[0, 0, 'hello']\n`
 3. **Client** `$stdin` *gets* `[0, 0, 'hello']\n`
 4. **Client** calls `if_dispatch([0, 0, 'hello'])`

#####Client ➜ Server
 1. **Client** calls `int_dispatch([0, 'hello'])`
 2. **Client** `$stdout` *writes* `[0, 'hello']\n`
 3. **Server** `$stdin` *gets* `[0, 'hello']\n`
 4. **Server** calls `int_dispatch([0, 'hello'])`

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
flok-0.0.36 docs/interactive.md
flok-0.0.35 docs/interactive.md
flok-0.0.34 docs/interactive.md
flok-0.0.33 docs/interactive.md
flok-0.0.32 docs/interactive.md
flok-0.0.31 docs/interactive.md
flok-0.0.30 docs/interactive.md
flok-0.0.29 docs/interactive.md
flok-0.0.28 docs/interactive.md
flok-0.0.27 docs/interactive.md
flok-0.0.26 docs/interactive.md
flok-0.0.25 docs/interactive.md
flok-0.0.24 docs/interactive.md
flok-0.0.23 docs/interactive.md
flok-0.0.21 docs/interactive.md
flok-0.0.20 docs/interactive.md
flok-0.0.19 docs/interactive.md
flok-0.0.18 docs/interactive.md
flok-0.0.17 docs/interactive.md
flok-0.0.16 docs/interactive.md