- -( dyne // software :: culture :: events :: planet :: discussion :: museum \\ freaknet )- -
 
Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members

httpstream.cpp File Reference

#include <config.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/errno.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/types.h>
#include <netdb.h>
#include <sys/uio.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/un.h>
#include <pthread.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <httpstream.h>

Go to the source code of this file.

Defines

#define SOCKET_ERROR   (-1)
#define INVALID_SOCKET   (-1)
#define HTTP_PREFIX   "http://"

Functions

in_addr_t host_to_ip (const char *name)
int fullsend (int sock, const char *buf, int buflen, int flags)
int fullrecv (int sock, char *buf, int buflen, int flags)
FILE * http_open (const char *url)
FILE * hopen (const char *url, const char *mode)
hstream stream_detect (const char *url)


Define Documentation

#define HTTP_PREFIX   "http://"
 

Definition at line 352 of file httpstream.cpp.

#define INVALID_SOCKET   (-1)
 

Definition at line 45 of file httpstream.cpp.

#define SOCKET_ERROR   (-1)
 

Definition at line 44 of file httpstream.cpp.


Function Documentation

int fullrecv int  sock,
char *  buf,
int  buflen,
int  flags
 

Definition at line 208 of file httpstream.cpp.

int fullsend int  sock,
const char *  buf,
int  buflen,
int  flags
 

Definition at line 181 of file httpstream.cpp.

FILE* hopen const char *  url,
const char *  mode
 

fopen() syntax. If

Parameters:
url is an url, it will open the stream, strip the header and return a valid FILE*, otherwise it will return whatever fopen() returns.

Definition at line 415 of file httpstream.cpp.

in_addr_t host_to_ip const char *  name  ) 
 

Definition at line 159 of file httpstream.cpp.

FILE* http_open const char *  url  ) 
 

Definition at line 354 of file httpstream.cpp.

hstream stream_detect const char *  url  ) 
 

Will open a connection to url, analyse header and close connection.

Definition at line 467 of file httpstream.cpp.