TibrvVcTransport::createAcceptVc()

Method

Declaration

TibrvStatus createAcceptVc(
    const char**       connectSubject,
    TibrvTransport*    transport);

Purpose

Create a virtual circuit accept object.

Remarks

This method creates a C accept transport and stores its handle in the C++ object.

Parameter

Description

connectSubject

The program supplies a location, and the method stores the connect subject of the new virtual circuit accept transport in that location.

After this call returns, the program must send a message to another program, inviting it to establish a virtual circuit. Furthermore, the reply subject of that invitation message must be this connect subject. To complete the virtual circuit, the second program must extract this subject from the invitation, and supply it to TibrvVcTransport::createConnectVc().

transport

The virtual circuit uses this ordinary transport for communications.

Programs may use this transport for other purposes.

It is illegal to supply a virtual circuit transport object for this parameter (that is, you cannot nest a virtual circuit within another virtual circuit).

Test Before Using

Either of two conditions indicate that the connection is ready to use:

The transport presents the VC.CONNECTED advisory.
TibrvVcTransport::waitForVcConnection() returns without error.

Procedure 

Immediately after this call, test both conditions with these two steps (in this order):

1. Listen on the virtual circuit transport object for the VC.CONNECTED advisory.
2. Call TibrvVcTransport::waitForVcConnection() with zero as the timeout parameter.

For an explanation, see Testing the New Connection in TIBCO Rendezvous Concepts.

See Also

TibrvVcTransport::createConnectVc()

TibrvVcTransport::waitForVcConnection()

VC.CONNECTED in TIBCO Rendezvous Concepts

VC.DISCONNECTED in TIBCO Rendezvous Concepts