Jump to main content

##

# TCPIP_SNTP_HandlerRegister Function

## C

    TCPIP_SNTP_HANDLE TCPIP_SNTP_HandlerRegister(
        TCPIP_SNTP_EVENT_HANDLER handler
    );

## Description

This function registers a SNTP event handler. The SNTP module will call the registered handler when a SNTP event (TCPIP_SNTP_EVENT) ovvurs.

## Preconditions

The SNTP module must be initialized.

## Parameters

Parameters | Description
--- | ---
handler | Handler to be called when a SNTP event occurs.

## Returns

- Returns a valid handle if the call succeeds.
- Returns a null handle if the call failed (an event handler already registered, for example).

## Remarks

The handler has to short and fast. It is meant for setting an event flag, not for lengthy processing.

Currently only one event handler is supported. To register a new one, use TCPIP_SNTP_HandlerDeRegister first.