Confirmed users
699
edits
Line 16: | Line 16: | ||
== Write the IPDL "Hello, world" protocol == | == Write the IPDL "Hello, world" protocol == | ||
(No, this isn't the traditional "Hello, world" example. IPDL lacks facilities for printing. I'm taking some poetic license.) | |||
You should be familiar with the following IPDL specification. If not, you should re-read the [[IPDL/Getting started guide]]. Copy the code into <code>ipc/test-harness/Test.ipdl</code>. | |||
namespace mozilla { | |||
namespace test { | |||
protocol Test | |||
{ | |||
child: | |||
Hello(); | |||
parent: | |||
World(); | |||
}; | |||
} // namespace test | |||
} // namespace mozilla | |||
We will use this specification to make a C++ program in which the parent sends the child the Hello() message, and the child prints "Hello, " to stdout. The child will then send the parent the World() message, and the parent will print "world!" to stdout. | |||
== Run the IPDL compiler == | == Run the IPDL compiler == |