# PvaClientChannelStateChangeRequester

This class has the single method channelStateChange. It is called each time the channel connection status changes.

NOTE: The implementation must not call a method that blocks waiting for a response from the server. It it does the client may be blocked forever.

An example of illegal code is:

    virtual void channelStateChange(PvaClientChannelPtr const & channel, bool isConnected)
    {
        if(isConnected&&!pvaClientPut)
        {
           pvaClientPut  = pvaClientChannel->createPut(request);
           pvaClientPut->connect();
        }
    }

This is illegal because the call to connect blocks.

The following is an example of legal code:

    virtual void channelStateChange(PvaClientChannelPtr const & channel, bool isConnected)
    {
        if(isConnected&&!pvaClientPut)
        {
           pvaClientPut  = pvaClientChannel->createPut(request);
           pvaClientPut->issueConnect();
        }
    }

This is legal code because neither createPut or issueConnect blocks.