Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Building and running


Setting up an echo server

The echo client require an echo servers to which to connect. Some organisations provide a public echo server. Otherwise, echo servers are freely available for download on the Internet.

[Top]


Setting the location of the echo server

The server address and hostname to which the application attempts to connect are simply set as constants in eikecho.h. Before building, you must edit these values. They are as follows:

Name

Description

KInetAddr

IP address: this is converted from a dotted-decimal format to a TUint32 by the INET_ADDR macro.

KInetHostName

The hostname

[Top]


Network setup

Before using the examples, you must set up the Emulator or target hardware to have access to the Internet (or other network where the echo server is located).

[Top]


Building

The examples are built in the standard way. You should build echoeng first, as eikecho links to its library.

[Top]


Running

Use of the example is straightforward. When you run eikecho, a window appears inviting you to type one of the following commands:

Command

Description

#

Connect to the IP address specified in KInetAddr

~

Resolve the hostname specified in KInetHostName and connect

1

Obtain the hostname of the IP address specified in KInetAddr and connect

To quit, use File | Exit.

After a connection to the server is made, any characters that you type are sent to the echo server. When the client receives a character back from the server, it writes the character to the window, separating each character by a full-stop.