SmartSockets .NET Class Library

TipcSvc.createConnClient Method 

Creates a new peer-to-peer client connection.

This method creates the client end of a peer-to-peer connection. The server end must be up and running prior to this call, so the client has something to connect to. The protocol, hostname, and port number for the connection are specified as a "logical connection name" (LCN), using the form: protocol:hostname:port. "_node" may be substituted for the local hostname.

Example:

            // connect to a peer listening via TCP on host foo at port 8002
            TipcConnClient conn = TipcSvc.createConnClient("tcp:foo:8002");
            
            // create a SmartSockets message and send it to the server
            TipcMsg msg = TipcSvc.createMsg(TipcMt_Fields.INFO);
            msg.appendStr("hello");
            conn.send(msg);
            conn.flush();
            

public static TipcConnClient createConnClient(
   string lcn
);

Parameters

lcn
the logical connection name to use for the connection

Return Value

the connection object

Exceptions

Exception TypeCondition
TipcBadArgumentException If the LCN is invalid
TipcTimeoutException For connection timeouts
TipcAssertionException If the LCN hostname is unknown
TipcMsgException For corrupt initialization messages
TipcIOException For lower-level errors
TipcNotFoundException When the protocol driver cannot be found
TipcProxyException For errors when connecting to a proxy server
TipcException For all other errors

See Also

TipcSvc Class | TipcSvc Members | TIBCO.SMARTSOCKETS Namespace | TipcConnClient


Copyright © TIBCO Software Inc. All rights reserved