This invention relates to client application programs and server programs that run in two different computers, herein called the client computer and the server computer respectively. More particularly, this invention relates to methods of establishing connections between such client and server programs using automatically constructed pipe names.
By a server program is herein meant any computer program which provides various services to other computer programs, that are called client application programs. But, before a client application program can obtain the services of any one server program, a particular type of connection must be established between the client program and the server program through an interface which the server program provides.
In the prior art, many different types of connections and interfaces to the server programs exist. For example, a first type of connection starts from the client program in the client computer, extends over a communication channel to a communications program in the server, and then goes directly to a portfile interface of the server program in the server computer.
As another example, a second type of connection starts from the client program in the client computer, extends over the communication channel to the communications program in the server computer, and goes from there to a portfile interface on another program which in turn connects to a library interface on the server program.
As still another example, a third type of connection starts from the client program in the client computer, extends over the communication channel to the communications program in the server computer, and goes from there to a library interface on another program which in turn connects to a different library interface in the server program.
To actually establish a particular type of connection between the client application program and the server program, a sequence of several steps needs to be performed in the client computer which involves many details that differ depending upon the type of connection that is to be made. For example, to establish each connection of the above first, second, and third type, a pipename needs to be constructed as a complex sequence of several parameters in a particular format that varies with the connection type.
In the prior art, each client program had the burden of including all of the steps that were needed to establish the connections which the client program sought with the server programs. However, to properly generate all of those steps is a very tedious task for the writer of the client program, which requires intimate knowledge of all of the interfaces to the server programs. Consequently, the task is both time-consuming and prone to error.
Accordingly, a primary object of the present invention is to provide a novel control program in the client computer which operates in conjunction with all of the client programs and relieves them of the burden of establishing the various types of connections that they seek with the server programs.
In accordance with the present invention, a method of selectively establishing any one connection of several different types between a client program in a first computer and a server program in a second computer includes the following steps. Initially, a control program is provided in the first computer which receives a command with parameters, from the client program, that specify the one type of connection which is to be established. In response, the control program automatically constructs a particular pipename which includes the parameters in a format that differs for each different type of connection. Thereafter, the control program tranmits the pipename which it constructed to a communications program in the second computer. Subsequently, the control program receives a result from the communications program which indicates whether or not the communications program used the pipename to successfully establish the one type of connection to the server program. Then, the control program notifies the client program of the result.
Due to the operation of the control program, each writer of the client programs is relieved of the tedious task of programming all of the steps which construct the complex pipenames. Instead, to establish a particular type of connection to a server program, the client program needs only to call the control program and sent it a command with parameters that specify the type of connection which is to be established.
In one particular embodiment, the second computer is an A-Series computer, and the communications program is an NX Services program. Also, in one particular embodiment, the control program is executed on the first computer under a windows operating system which includes a CreateFile Application Program Interface; and the control program passes the pipename to the CreateFile Application Program Interface as a substep of the transmitting step.