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