3. 3
Core-Server
#1
HSDC
HSDB
UpLink
Channel
Module
DownLink
Channel
Module
Core-Server
#2
A1
B1
A2
B2
…
…
…
…
Send
Receive
Send
Receive
图 2:核心服务器与 HSDC、HSDB(数据库)通信部分
Connection flow :
1. Core-Server #1 (CS1) connect to UpLink channel of HSDC, w hen the connection is established (A1), HSDC w ill
inform Dow nLinkchannel.
2. Dow nLinkchannelw illestablish a connection to CS1’s receiving port (B1).
3. When B1 is established, Dow nLinkchannelw illinformUpLink that “We are ready”, after this, CS1 can start to use
the service of HSDC.
The UpLink Channel Module w ill handle the data retrieving from Core-Server, and Dow nLink w ill response for
sending data back to Core-Server.
For services like IM text messages, Dow nLink Module w ill also monitor the user location and w here the text
messages should go. It’s a response for exchange data between CS1 and CS2 (or said CSN).
库结构
发送部分
typedef struct IM_TextMsg_SEND_PACKET {
// packet header
im_packet_header header;