#ifndef WSHTTP_H
#define WSHTTP_H

extern long  WSGFhttpInit ();
extern long  WSGFloadRemoteFile(char*,char**,char**,long*,long*,long);
extern long  WSGFhttpConnect(char *host, long port,int *sock);
extern long  WSGFhttpWrite (int sock, char *path);
extern long  WSGFhttpRead (int sock, char **buf, long *buf_sz);
extern char* WSGFhttpExtractText(char *buf, long *buf_size, long *html, char **content_type);
extern long  WSGFtcpConnect(char* host,int port,int* sock);
extern long  WSGFtcpWrite(int sock,char* buf,int size);
extern long  WSGFtcpRead(int sock,char** buf,int* size);

#define WS_INTR       -10
#define WS_TERM       -11

#define WS_WRITE_ERR  -20
#define WS_READ_ERR   -21
#define WS_MEM_ERR    -22
#define WS_FORMAT_ERR -23
#define WS_FILE_ERR   -24
#define WS_HOSTN_ERR  -25
#define WS_NET_ERR    -26

#endif /*WSHTTP_H*/
