#include "socket/include/socket.h"
Data Structures | |
struct | Network_t |
struct | Timer |
Macros | |
#define | MQTT_MAX_CLIENTS TCP_SOCK_MAX |
Copyright (C) 2017 Microchip Technology Inc. More... | |
Typedefs | |
typedef struct Network_t | Network |
typedef struct Timer | Timer |
Functions | |
int | ConnectNetwork (Network *, char *, int, int) |
void | dnsResolveCallback (uint8_t *, uint32_t) |
void | NetworkInit (Network *n) |
void | tcpClientSocketEventHandler (SOCKET, uint8_t, void *) |
void | winc1500_disconnect (Network *) |
int | winc1500_read (Network *, unsigned char *, unsigned int, int) |
int | winc1500_write (Network *, unsigned char *, unsigned int, int) |
#define MQTT_MAX_CLIENTS TCP_SOCK_MAX |
Copyright (C) 2017 Microchip Technology Inc.
and its subsidiaries (Microchip). All rights reserved.
You are permitted to use the software and its derivatives with Microchip products.
SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL OR EQUITABLE THEORY FOR ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR OTHER SIMILAR COSTS. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP AND ITS LICENSORS LIABILITY WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, THAT YOU PAID DIRECTLY TO MICROCHIP TO USE THIS SOFTWARE. MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE TERMS.
THIRD PARTY SOFTWARE: Notwithstanding anything to the contrary, any third party software accompanying this software is subject to the terms and conditions of the third party’s license agreement or open source software license. To the extent required by third party or open source licenses covering such third party software, the terms of such license will apply in lieu of the terms provided herein. To the extent the terms of such third party licenses prohibit any of the restrictions described herein, such restrictions will not apply to such third party software. THIRD PARTY SOFTWARE IS SUBJECT TO THE FOREGOING WARRANTY DISCLAIMER AND LIMIT ON LIABILITY PROVIDED IN THE PARAGRAPH ABOVE.
Referenced by allocateClient(), deAllocateClient(), and isMQTTSocket().
int ConnectNetwork | ( | Network * | , |
char * | , | ||
int | , | ||
int | |||
) |
References _htons, addr, AF_INET, close(), connect(), gbMQTTBrokerConnected, gbMQTTBrokerIpresolved, gethostbyname(), gi32MQTTBrokerIp, gpcHostAddr, m2m_wifi_handle_events(), NULL, printf, in_addr::s_addr, sockaddr_in::sin_addr, sockaddr_in::sin_family, sockaddr_in::sin_port, SOCK_ERR_INVALID, SOCK_ERR_NO_ERROR, SOCK_STREAM, and socket().
Referenced by mqtt_connect().
void dnsResolveCallback | ( | uint8_t * | , |
uint32_t | |||
) |
References gbMQTTBrokerIpresolved, gi32MQTTBrokerIp, gpcHostAddr, IPV4_BYTE, and printf.
Referenced by mqtt_socket_resolve_handler().
void NetworkInit | ( | Network * | n | ) |
References Network::disconnect, Network::mqttread, Network::mqttwrite, WINC1500_disconnect(), WINC1500_read(), and WINC1500_write().
Referenced by mqtt_init().
void tcpClientSocketEventHandler | ( | SOCKET | , |
uint8_t | , | ||
void * | |||
) |
References gbMQTTBrokerConnected, gbMQTTBrokerRecvDone, gbMQTTBrokerSendDone, gi32MQTTBrokerRxLen, isMQTTSocket(), printf, tstrSocketRecvMsg::s16BufferSize, SOCK_ERR_TIMEOUT, SOCKET_MSG_CONNECT, SOCKET_MSG_RECV, SOCKET_MSG_SEND, and tstrSocketRecvMsg::u16RemainingSize.
Referenced by mqtt_socket_event_handler().
void winc1500_disconnect | ( | Network * | ) |
int winc1500_read | ( | Network * | , |
unsigned char * | , | ||
unsigned | int, | ||
int | |||
) |
int winc1500_write | ( | Network * | , |
unsigned char * | , | ||
unsigned | int, | ||
int | |||
) |