User's Manual

278 Module eAPI
7 You can alter the code shown in Figure 46 "Sample socket
client code" (page 279) to specify the correct parameters for
the parameters group (use one of the values specified in the
eKERNEL_GROUP table), alarm description (use one of the
values specified in the eKERNEL_ALARM table), and so on.
--End--
Note:
The code shown in Figure 46 "Sample socket client code" (page
279) is not intended to represent a reliable TCP client, and is meant
only to illustrate how to start programming with eAPI using minimal code
entry. A real-life program must take all necessary action to handle all
error conditions.
The following issues usually require improvement:
The sample code shown in Figure 46 "Sample socket client code"
(page 279) does not respond on the asynchronous connection attempt
by means of the Winsock1_Connect() event. The code assumes that
the connect succeeds after doing a DoEvents(). The Winsock1.State
must be 7 before a SendData can be requested.
The sample code shown in Figure 46 "Sample socket client code"
(page 279) includes appropriate error recovery, but does not respond
to failed connection attempts.
The sample code shown in Figure 46 "Sample socket client code"
(page 279) assumes the data is actually transmitted with the
SendData, and does not wait for the Winsock1_SendComplete() event.
The values for IP address and port are hard-coded, and users must be
able to set them as parameters in a real-word program.
The values in the message request are hard-coded, and must be filled
with actual alarm information and appropriate configured values, as
defined in the configuration database.
Nortel Communication Server 1000
DECT Messenger Installation and Commissioning — Book 1
NN43120-301 02.01 4 June 2010
Copyright © 2003-2010 Nortel Networks. All Rights Reserved.
.