mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-16 03:39:22 +08:00
7ac09ece24
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@100 bbd45198-f89e-11dd-88c7-29a3b14d5316
25 lines
549 B
C
25 lines
549 B
C
#ifndef __HTTP_H__
|
|
#define __HTTP_H__
|
|
|
|
#include <rtthread.h>
|
|
|
|
struct http_session
|
|
{
|
|
char* host;
|
|
int port;
|
|
|
|
char* user_agent;
|
|
int socket;
|
|
|
|
/* size of http file */
|
|
rt_size_t size;
|
|
rt_off_t position;
|
|
};
|
|
|
|
struct http_session* http_session_open(char* url);
|
|
rt_size_t http_session_read(struct http_session* session, rt_uint8_t *buffer, rt_size_t length);
|
|
rt_off_t http_session_seek(struct http_session* session, rt_off_t offset, int mode);
|
|
int http_session_close(struct http_session* session);
|
|
|
|
#endif
|