|
|
RQL_connectdb: sends information from a client to the server to connect him to a DB named dbname and open a session where transactions will take place with the database. For the intercommunication with the server functions sendstr and recvstr are used so that the data exchanging are in XDR format for interoperability. -
Parameters:
-
| argc |
is an integer that displays the number of strings that the next argument (char**) contains. |
| argv |
is a char** that contains argc strings. The three first strings must be in order; host,port,dbname. Host is the name of the host that the server is running. port is the port that the server listens. dbname is the name of the database. |
-
Returns:
-
Upon succesfull completion RQL_connevtdb returns an int that is the socket address were the communicatoin will take place. the communication will take place. This will be used by the functions that will communicate with the database. If an error occurs within the execution of this function -1 will be returned to the caller.
|