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();
the connection object
Exception Type | Condition |
---|---|
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 |
TipcSvc Class | TipcSvc Members | TIBCO.SMARTSOCKETS Namespace | TipcConnClient