The invention enables an application program to communicate a message over
a network without having information regarding a protocol employed by the
network. A network library program, running independently of the
application program, stores communication protocol data and procedures for
establishing message transport data structures to be used in communicating
over the network. Initially, the application program passes an address
string to the network library program. In response, the network library
program determines a network protocol to be used by analyzing the received
address string. The network library program then creates a "transport
address" data structure which records both the protocol and the address
string. The network library program further establishes a "transport" data
structure for the specific message type to be dispatched, which data
structure includes a dispatch command and a socket handle to be used
during the transmission. Thereafter, the application program invokes the
network library program to proceed with execution of the message dispatch
action by using both the transport address data structure and the
transport data structure.