[[Property:title|Introduction to the examples]]
[[Property:weight|4]]
[[Property:uuid|3d9d54ab-0324-d8d4-ae32-f5379f2fc721]]
The following sections describe a set of examples showing how to use EiffelNet to build client-server applications.
The examples start with the most simple uses involving high-level classes covering common cases and shielding developers from details of the mechanism. Subsequent examples will reveal some of these details, useful for more advanced or specific applications of EiffelNet.
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 IO_MEDIUM
, 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:
class
OUR_MESSAGE
inherit
LINKED_LIST [STRING]
STORABLE
undefine
is_equal, copy
end
create
make
end
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 STORABLE
.
{{caution|On Windows, the examples `advanced` and the `same_mach` are nonfunctional. This is because these examples use code specific to Unix Operating systems. }}