VCTransport.CreateConnectVC
Method
Visual Basic
Public Shared FunctionCreateConnectVC
(
ByVal transport As Transport,
ByVal connectSubject As String )
As VCTransport
C#
public staticVCTransport
CreateConnectVC
(
Transport transport,
string connectSubject );
Purpose
Create a virtual circuit connect object
Parameter |
Description |
|
The virtual circuit terminal 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). |
|
The terminal uses this connect subject to establish a virtual circuit with an accept transport in another program. The program must receive this connect subject from the accepting program. The call to VCTransport.CreateAcceptVC creates and returns this subject. |
Test Before Using
Either of two conditions indicate that the connection is ready to use:
• | The transport presents the VC.CONNECTED advisory. |
• | VCTransport.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 VCTransport.WaitForVCConnection with zero as the timeout parameter. |
For an explanation, see Testing the New Connection on page 99 in .