TCPIP_HTTP_NET_ConnectionDataBufferGet Function

C

uint8_t* TCPIP_HTTP_NET_ConnectionDataBufferGet(
    TCPIP_HTTP_NET_CONN_HANDLE connHandle
);

Description

This function returns a pointer to the HTTP connection internal data buffer. This gives access to the application to the data that's stored in the HTTP connection buffer.

Preconditions

None.

Parameters

ParametersDescription
connHandleHTTP connection handle.

Returns

  • A pointer to the connection's general purpose data buffer.

Remarks

None.

Example

template_DynPrint(TCPIP_HTTP_NET_CONN_HANDLE connHandle, 
    const TCPIP_HTTP_DYN_VAR_DCPT* varDcpt, 
    const TCPIP_HTTP_NET_USER_CALLBACK* pCBack)
{
    const uint8_t *ptr;

    ptr = TCPIP_HTTP_NET_ArgGet(TCPIP_HTTP_NET_ConnectionDataBufferGet
                                (connHandle), (const uint8_t*)"name");
    if(ptr == 0)
    {
        ptr = "not set";
    }
    else
    {
        strncpy(myBuffer, ptr, sizeof(myBuffer));
        ptr = myBuffer;
    }
    TCPIP_HTTP_NET_DynamicWrite(varDcpt, ptr, strlen(ptr), false);
}