/** * \brief Callback to get the data from socket. * * \param[in] sock socket handler. * \param[in] u8Msg socket event type. Possible values are: * - SOCKET_MSG_BIND * - SOCKET_MSG_LISTEN * - SOCKET_MSG_ACCEPT * - SOCKET_MSG_CONNECT * - SOCKET_MSG_RECV * - SOCKET_MSG_SEND * - SOCKET_MSG_SENDTO * - SOCKET_MSG_RECVFROM * \param[in] pvMsg is a pointer to message structure. Existing types are: * - tstrSocketBindMsg * - tstrSocketListenMsg * - tstrSocketAcceptMsg * - tstrSocketConnectMsg * - tstrSocketRecvMsg */ static void socket_cb(SOCKET sock, uint8_t u8Msg, void *pvMsg) { http_client_socket_event_handler(sock, u8Msg, pvMsg); }
/** * \brief Callback to get the Socket event. * * \param[in] Socket descriptor. * \param[in] msg_type type of Socket notification. Possible types are: * - [SOCKET_MSG_CONNECT](@ref SOCKET_MSG_CONNECT) * - [SOCKET_MSG_BIND](@ref SOCKET_MSG_BIND) * - [SOCKET_MSG_LISTEN](@ref SOCKET_MSG_LISTEN) * - [SOCKET_MSG_ACCEPT](@ref SOCKET_MSG_ACCEPT) * - [SOCKET_MSG_RECV](@ref SOCKET_MSG_RECV) * - [SOCKET_MSG_SEND](@ref SOCKET_MSG_SEND) * - [SOCKET_MSG_SENDTO](@ref SOCKET_MSG_SENDTO) * - [SOCKET_MSG_RECVFROM](@ref SOCKET_MSG_RECVFROM) * \param[in] msg_data A structure contains notification informations. */ static void socket_event_handler(SOCKET sock, uint8_t msg_type, void *msg_data) { http_client_socket_event_handler(sock, msg_type, msg_data); }