Open topic with navigation

TIBCO Rendezvous® 8.7.0

# tibrvTransport_CreateAcceptVc()

Function

## Declaration

    tibrv_status tibrvTransport_CreateAcceptVc(
        tibrvTransport*    vcTransport,
        const char**       connectSubject,
        tibrvTransport     transport);

## Purpose

Create a virtual circuit accept object.

## Remarks

A virtual circuit transport can fill the same roles as an ordinary transport. Programs can supply them as arguments to calls that create inbox names, send messages, create listeners and other events.

Parameter | Description
`vcTransport` | The program supplies a location, and the function stores the new virtual circuit accept transport in that location.
`connectSubject` | The program supplies a location, and the function 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 tibrvTransport_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.

| • | tibrvTransport_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 tibrvTransport_WaitForVcConnection() with zero as the timeout parameter.

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

## Broken Connection

The following conditions can close a virtual circuit connection:

| • | Contact is broken between the object and its terminal.

| • | The virtual circuit loses data in either direction (see `DATALOSS` in TIBCO Rendezvous Concepts).

| • | The partner program destroys its terminal object (or that terminal becomes invalid).

| • | The program destroys the object.

| • | The program destroys the object’s ordinary transport.

## Destroying VC Transports

Programs must explicitly destroy each virtual circuit transport object. Destroying a transport object precludes subsequent communications on that transport, and frees its storage. Attempting to use a destroyed transport in any way is an error. See tibrvTransport_Destroy().

Destroying a virtual circuit transport does not affect the ordinary transport that the terminal employs.

## Direct Communication

Because virtual circuits rely on point-to-point messages between the two terminals, they can use direct communication to good advantage. To do so, both terminals must use network transports that enable direct communication.

For an overview, see Direct Communication in TIBCO Rendezvous Concepts.

For programming details, see Specifying Direct Communication in TIBCO Rendezvous Concepts.

## Disabled Functions

Although virtual circuit transport objects have the same data type as transport objects, some transport functions are disabled for virtual circuit objects.

Transport Functions
Legal Calls for Virtual Circuit Transports | `tibrvTransport_CreateInbox()` `tibrvTransport_Destroy()` tibrvTransport_Send() tibrvTransport_SendReply() tibrvTransport_SendRequest()
Disabled Calls for Virtual Circuit Transports | tibrvTransport_GetDaemon() tibrvTransport_GetDescription() tibrvTransport_GetNetwork() tibrvTransport_GetService() tibrvTransport_SetBatchMode() tibrvTransport_SetDescription()

## See Also

tibrvTransport_Destroy()

tibrvTransport_CreateConnectVc()

tibrvTransport_WaitForVcConnection()

`VC.CONNECTED` in TIBCO Rendezvous Concepts

`VC.DISCONNECTED` in TIBCO Rendezvous Concepts

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2023. Cloud Software Group, Inc. All Rights Reserved.