A method for transparently controlling communications between a network application and a plurality of network communications protocol stacks, the method comprising:
- in a stack multiplexer layer located between the network application and the plurality of network communication protocol stacks:
- (a) intercepting a socket creation function call generated by the network application using an application programming interface;
- (b) creating a pseudo communications endpoint in response to the socket creation function call;
- (c) intercepting at least one sockets-related function call to the socket of step (a);
- (d) determining whether the application comprises a client or a server based on the sockets-related function call;
- and
- (e) based on the determination in step (d), creating at least one protocol-stack-specific communications endpoint and making client- or server-related socket function calls from the stack multiplexer layer to at least one of the plurality of network communications protocol stacks using the at least one protocol-stack-specific communications endpoint and the application programming interface.