Applies To: |
|
Summary: |
Question: How do I use the MsgOpen function on the server side? |
Solution: |
When you use MsgOpen on the server side,
the handle returned is not the handle to the client - it is only a
handle to that server's name. It cannot be the handle to the
client, as each server can have many clients, and also when the
server is started, the client will not have logged in yet. When the
clients login to the sever and start sending their message, the
MsgPostServer() function will be called to receive the clients
messages. For example, on the server call the MsgOpen function as
shown below:
MsgOpen("Alarm", 1, MsgPostServer);
END When the MsgPostServer() function is called to show a message has arrived, call the MsgRead() function to read the message. MsgRead() will return the handle of the client who sent the message. This way you can use this handle to send back the result to the request send via the client. This also allows a single server post function to handle all the clients at the same time. |
Keywords: |
Related Links
Attachments