next up previous contents
Next: 9.2.3 Making Your Own Up: 9.2 The WIRE Package Previous: 9.2.1 Untagged Data

9.2.2 Tagged Data

When using these routines, the system automatically transmits and interprets the tags for you, so both ends can figure out what kind of data transfers occur. Sending tagged data allows a greater variety of data types: integers inclusively less than 32 bits in length, symbols, lists, and remote-objects (see section 9.1.3). The system sends symbols as two strings, the package name and the symbol name, and if the package doesn't exist remotely, the remote process signals an error. The system ignores other slots of symbols. Lists may be any tree of the above valid data types. To send other data types you must represent them in terms of these supported types. For example, you could use prin1-to-string locally, send the string, and use read-from-string remotely.

[Function]
wire: wire-output-object wire object &optional cache-it
wire:wire-get-object wire

The function wire-output-object sends object over wire preceded by a tag indicating its type.

If cache-it is non-nil, this function only sends object the first time it gets object. Each end of the wire associates a token with object, similar to remote-objects, allowing you to send the object more efficiently on successive transmissions. cache-it defaults to t for symbols and nil for other types. Since the RPC level requires function names, a high-level protocol based on a set of function calls saves time in sending the functions' names repeatedly.

The function wire-get-object reads the results of wire-output-object and returns that object.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997