Added description of OUR_MESSAGE. Had been in "The predefined level" which was moved to trash.

Author:halw
Date:2012-04-29T23:17:12.000000Z


git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1083 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
halw
2012-04-29 23:17:12 +00:00
parent 2ef63ec632
commit d2ede66f13

View File

@@ -7,6 +7,33 @@ The examples start with the most simple uses involving high-level classes coveri
All the examples discussed here appear in the directory ''$ISE_EIFFEL/examples/net'' of the Eiffel distribution.
===Object structures===
As noted above, it is possible with sockets, as any other <code>IO_MEDIUM</code>, to send and receive simple objects such as integers. But for this first example we are already more ambitious and want to exchange entire linked lists of strings. The structures that we will exchange are described by the following class:
<code>
class
OUR_MESSAGE
inherit
LINKED_LIST [STRING]
STORABLE
undefine
is_equal, copy
end
create
make
end
</code>
Note that to make use of the storage and retrieval facilities the objects to be exchanged must be instances of a class which, as here, is a descendant of <code>STORABLE</code>.
{{caution|On Windows, the examples `advanced' and the `same_mach' are nonfunctional. This is because these examples use code specific to Unix Operating systems. }}