#include <conio.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <assert.h>#include "inet/httpget.h"#include "inet/base64.h"#include "inet/dns.h"#include "inet/url.h"#include "clib/rtos.h"#include "clib/tcpip.h"#include "mpbuf.h"#include "misc.h"#include "vs1001.h"Go to the source code of this file.
Functions | |
| char * | sockgets (char *s, int n, int sd) |
| Gets a string from a socket. | |
| int | sockputs (const char *s, int sd) |
| Outputs a string to a socket. | |
| unsigned | http_connect (const char *urlString, int *error) |
| Connect to a HTTP server. | |
| void | getMetaData (int sd) |
| void | http_get (const char *urlString) |
|
|
Definition at line 182 of file httpget.cpp. References MSG_TIMEOUT, and recv(). |
|
||||||||||||
|
Connect to a HTTP server.
Definition at line 108 of file httpget.cpp. References base64encode(), DEFAULT_HTTP_PORT, free_url(), gethostbyname(), URL::host, inet_addr(), parse_url(), URL::pass, URL::path, URL::port, sockputs(), tcp_connect(), and URL::user. Referenced by http_get(). |
|
|
Definition at line 203 of file httpget.cpp. References BUF_Clear(), BUF_GetFreeBytes(), BUF_GetSize(), BUF_Lock(), BUF_Play(), BUF_SetThreshold(), BUF_Unlock(), closesocket(), http_connect(), IP_PROTOTCP_LEVEL, MSG_TIMEOUT, recv(), RTX_Sleep_Time(), setsockopt(), sockgets(), and TCP_DELAY_ACK. |
|
||||||||||||||||
|
Gets a string from a socket. sockgets reads characters from a socket into the string s. The function stops reading when it reads either n-1 characters or a newline character whichever comes first. sockgets retains the newline character at the end of s. A null byte is appended to s to mark the end of the string.
Definition at line 49 of file httpget.cpp. References MSG_TIMEOUT, and recv(). Referenced by http_get(). |
|
||||||||||||
|
Outputs a string to a socket. fputs copies the null-terminated string s to the given output stream; it does not append a newline character and the terminating null character is not copied.
Definition at line 82 of file httpget.cpp. References send(). Referenced by http_connect(). |
1.2.16