Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

FairCom Client/Server Communication

The client/server communication is client driven. For every attached user to the FairCom Server there is a corresponding thread created inside the server to service the client requests. The thread created inside the server waits on a blocking socket for communication from the client. The thread will effectively wait forever unless the communications channel is terminated. If the OS determines that the communications channel is no longer valid, the BLOCK on the read is freed and a read is attempted by the server thread. However, if there is nothing in the buffer, the server will log an error 128 ‘CNTIO READ ERROR’ in the CTSTATUS.FCS file followed by a 161 error indicating that the server is assuming that the client has gone away and will clean up the connection.

The client thread proceeds to shut down the socket performing the necessary clean up and closing of the socket connection. In this situation a socket can take up to 3 or 4 minutes depending on the OS to completely shut down.

A client should shut down by calling CLISAM() or STPUSR() to allow the server to process the client connection termination in an orderly and efficient manner.

Previous Topic

Next Topic

Logging On and Off the Server

When using the FairCom Server, applications must establish communications with the FairCom Server. This is called logging on. The following ISAM routines automatically log on: InitISAM(), OpenISAM(), or CreateISAM(). When using low-level functions, InitCTree() logs on.

When applications finish, they need to disconnect from the FairCom Server. This allows the FairCom Server to reallocate the memory used for this application to other uses. The ISAM routine CloseISAM() logs off. When using low-level or ISAM functions, use StopUser() to log off.

TOCIndex