Common Socket Codes

During the building of the socloc server and API, it became apparent that the socloc server needed to communicate with other servers. As a result of this development, a small number of common send codes have been set aside. In addition, a small number of return codes are also common. These common codes have been placed into the header file comcode.h. Here are the definitions:

/* These send codes should be common to all clients and servers, they
   allow any client/server to query another. This is especially important
   for the socket locate server ('socloc'). */

#define SOCKET_SEND_STATUS 999
#define SOCKET_SEND_TERM 998
#define SOCKET_SEND_LOG_OFF 997
#define SOCKET_SEND_LOG_ON 996
#define SOCKET_SEND_LOG_STATUS 995
#define SOCKET_SEND_SERVICE_NAME 994
#define SOCKET_SEND_VERSION 993
#define SOCKET_SEND_TRANS_NUM 992
#define SOCKET_SEND_CONNECT_NUM 991

/* Common receive/reply codes, ditto */

#define SOCKET_RC_OK 0
#define SOCKET_RC_VC_ERROR 900

Any server or client application that will be interfacing with socloc should include the header file flsocket.h and use these common codes.

These common socket codes are used in all multiuser situations across two IPC methods. The term common socket codes is a bit misleading because the QNX 4x platform version of our GPL software uses QNX message passing as the IPC method, not TCP.

Goto Top | Future Lab Home | Contact Webmaster | Feedback

Copyright © 2000-2006 Future Lab, Last Updated Jun 25, 2006