How to send packets at periodic intervals

so from your reply can i write the code as follows

/***************************************************************************/
/*  Function   : cbevh                                                     */
/*-------------------------------------------------------------------------*/
/*  Object     : Handling events happenning on the TCP client socket.      */
/*-------------------------------------------------------------------------*/
/*  Variable Name     |IN |OUT|GLB|  Utilisation                           */
/*--------------------+---+---+---+----------------------------------------*/
/*  ev                | X |   |   |  WIP event                             */
/*--------------------+---+---+---+----------------------------------------*/
/*  ctx               | X |   |   |  user data (unused)                    */
/*--------------------+---+---+---+----------------------------------------*/
/***************************************************************************/
static void cbevh ( wip_event_t *ev, void *ctx )
{
    switch ( ev->kind )
    {
        case WIP_CEV_OPEN:
        {
            TRACE ( ( NORMAL_TRACE_LEVEL, "[SAMPLE] Connection established successfully" ) );
            tcp_channel = ev->channel;
           
            adl_tmrSubscribe(TRUE, 150, ADL_TMR_TYPE_100MS, timerCallback);
            break;
        }
case WIP_CEV_ERROR:
        {
            TRACE ( ( ERROR_TRACE_LEVEL, "[SAMPLE] Error %i on socket. Closing.",  ev->content.error.errnum ) );
            wip_close ( ev->channel );
            break;
        }

        case WIP_CEV_PEER_CLOSE:
        {
            TRACE ( ( NORMAL_TRACE_LEVEL, "[SAMPLE] Connection closed by peer" ) );
            wip_close ( ev->channel );
            break;
        }

        default:
        {
            break;
        }
    }
}

then i called wip_TCPClientCreate like follows

void AppliEntryPoint ( void )
{
    wip_channel_t socket;
    TRACE ( ( NORMAL_TRACE_LEVEL, "[SAMPLE]: connecting to client %s:%i", TCP_PEER_STRADDR, TCP_PEER_PORT ) );
    socket = wip_TCPClientCreate ( TCP_PEER_STRADDR, TCP_PEER_PORT, cbevh, NULL );
    if ( !socket )
    {
        TRACE ( ( ERROR_TRACE_LEVEL, "[SAMPLE] Can't connect" ) );
        return;
    }

}

or else
call the function

or need to call from the

if need to use the above functions how do i call those functions?

thanks