Microchip® Advanced Software Framework

http-socket.h File Reference
#include "tcp-socket.h"

Data Structures

struct  http_socket
 
struct  http_socket_header
 

Macros

#define HTTP_SOCKET_INPUTBUFSIZE   UIP_TCP_MSS
 
#define HTTP_SOCKET_OUTPUTBUFSIZE   UIP_TCP_MSS
 
#define HTTP_SOCKET_TIMEOUT   ((2 * 60 + 30) * CLOCK_SECOND)
 
#define HTTP_SOCKET_URLLEN   128
 

Typedefs

typedef void(* http_socket_callback_t )(struct http_socket *s, void *ptr, http_socket_event_t ev, const uint8_t *data, uint16_t datalen)
 

Enumerations

enum  http_socket_event_t {
  HTTP_SOCKET_ERR,
  HTTP_SOCKET_OK,
  HTTP_SOCKET_HEADER,
  HTTP_SOCKET_DATA,
  HTTP_SOCKET_CLOSED,
  HTTP_SOCKET_TIMEDOUT,
  HTTP_SOCKET_ABORTED,
  HTTP_SOCKET_HOSTNAME_NOT_FOUND
}
 

Functions

int http_socket_close (struct http_socket *socket)
 
int http_socket_get (struct http_socket *s, const char *url, int64_t pos, uint64_t length, http_socket_callback_t callback, void *callbackptr)
 
int http_socket_post (struct http_socket *s, const char *url, const void *postdata, uint16_t postdatalen, const char *content_type, http_socket_callback_t callback, void *callbackptr)
 

#define HTTP_SOCKET_INPUTBUFSIZE   UIP_TCP_MSS
#define HTTP_SOCKET_OUTPUTBUFSIZE   UIP_TCP_MSS
#define HTTP_SOCKET_TIMEOUT   ((2 * 60 + 30) * CLOCK_SECOND)

Referenced by start_timeout_timer().

#define HTTP_SOCKET_URLLEN   128

typedef void(* http_socket_callback_t)(struct http_socket *s, void *ptr, http_socket_event_t ev, const uint8_t *data, uint16_t datalen)

Enumerator
HTTP_SOCKET_ERR 
HTTP_SOCKET_OK 
HTTP_SOCKET_HEADER 
HTTP_SOCKET_DATA 
HTTP_SOCKET_CLOSED 
HTTP_SOCKET_TIMEDOUT 
HTTP_SOCKET_ABORTED 
HTTP_SOCKET_HOSTNAME_NOT_FOUND 

int http_socket_close ( struct http_socket socket)