\begin{comment}
Graph [Virtual Connection State Machine],
      [size="6.5,8"]

\end{comment}
\begin{verbatim}
State [Unbound]
    Event [VC-Open] 
        //
        // A request for service was issued for this virtual connection.
        // Before we can perform such a request, we need to bind the virtual
        // connection to a communication method and establish a real connection
        // with the destination process.
        //
        Invoke_Action([Bind Method],[label="service\nrequest"])

Action [Bind Method],[label="Bind\nMethod"]
    //
    // Here we figure out what communication method this virtual connection
    // should use for communication, and bind the various virtual function
    // pointer tables to the tables defined by that method.
    //
    Invoke_Action[Conn Open]

State [Unconnected]
    Event [VC-Open] 
        //
        // A request for service was issued for this virtual connection.
        // Before we can perform such a request, we need to establish a real
        // connection with the destination process.
        //
        Invoke_Action([Conn Open],[label="service\nrequest"])

Action [Conn Open],[label="Initiate\nConnection"] 
    //
    // We need to initialize at least the receive side state machine now so
    // that any unexpected incoming packets arriving shortly after connection
    // establishment are properly handled.  We could intialize send state
    // machine, but it can't actually start sending until the connection has
    // been established.
    //
    initialize recv state machine
    initiate establishment of real connection

    // TODO: we need one or more method functions for performing the above
    // stated tasks

    Change_State([Await Conn Open])

State [Await Conn Open],[label="Opening\nConnection"]
    //
    // TODO: we an mechanism for signalling the success or failure of the
    // connection establishment
    //                                       
    Event [Success]
        Invoke_Action([Finish Conn Open],[label="connection\nestablished"])

    Event [Error]
        //
        // Connection establishment failed.  Too bad...we assume that the
        // method has already worn itself out trying to make this connection
        // happen, so we are just going to admit failure and give up.
        //
        Change_State([Failed], [label="connection\nfailed"])


Action [Finish Conn Open], [label="Enable\nConnection"]
        // 
        // Connection establishment was successful.  Now we need to sure the
        // send state machine gets started (or moved out a "connection
        // pending" state).
        //
        initialize send state machine
        Change_State([Connected])

State [Connected]
    Event [VC-Close]
        //
        // TODO: we need a way to make a close request
        //
        Invoke_Action([Conn Close], [label="close"])

    Event [Error]
        // 
        // The connection fell over.  At the moment, this is a permanent
        // failure.  Some additional states would need to be added here and
        // to the send and recv state machines in order to handle
        // connection re-establishment.
        // 
        Change_State([Failed], [label="unexpected\nconnection\nfailure"])

Action [Conn Close], [label="Close\nConnection"]
    //
    // A connection close has been requested.  At the moment, we only envision
    // this happening when communicator spanning multiple process groups is
    // destroyed.  The requesting routine should ensure that all outstanding
    // requests are satisfied or cancelled before making a close request.
    // Since the destruction of a communicator is a collective operation,
    // meeting this requirement shouldn't be difficult.
    //
    initiate close of real connection
    Change_State([Await Conn Close])


State [Await Conn Close], [label="Closing\nConnection"]
    Event [Success]
        Invoke_Action([Finish Conn Close],[label="connection\nclosed"])

    Event [Error]
        //
        // Connection close failed.  What do we do now???
        //
        Change_State([Failed], [label="conection\nclose\nfailed"])

Action [Finish Conn Close], [label="Connection\nCleanup"]
    //
    // Clean up an necessary data structures so that we can reconnect later if
    // necessary
    //
    Change_State([Unconnected])

State [Failed]
    // 
    // At the moment, virtual connection failures are permanent.
    // 
\end{verbatim}
