4.115
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2012 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Obere Lagerstr. 30 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifndef TEST_WEB_CLIENT_H |
---|
16 | #define TEST_WEB_CLIENT_H |
---|
17 | |
---|
18 | #include <stdint.h> |
---|
19 | #include <stdbool.h> |
---|
20 | #include <stdio.h> |
---|
21 | |
---|
22 | #ifdef __cplusplus |
---|
23 | extern "C" { |
---|
24 | #endif /* __cplusplus */ |
---|
25 | |
---|
26 | typedef struct |
---|
27 | { |
---|
28 | int socket; |
---|
29 | FILE *fd; |
---|
30 | } |
---|
31 | httpc_context; |
---|
32 | |
---|
33 | void httpc_init_context( |
---|
34 | httpc_context *ctx |
---|
35 | ); |
---|
36 | |
---|
37 | bool httpc_open_connection( |
---|
38 | httpc_context *ctx, |
---|
39 | const char *targethost, |
---|
40 | int targetport |
---|
41 | ); |
---|
42 | |
---|
43 | bool httpc_close_connection( |
---|
44 | httpc_context *ctx |
---|
45 | ); |
---|
46 | |
---|
47 | bool httpc_send_request( |
---|
48 | const httpc_context *ctx, |
---|
49 | const char *request, |
---|
50 | char *response, |
---|
51 | int responsesize |
---|
52 | ); |
---|
53 | |
---|
54 | bool httpc_ws_open_connection( |
---|
55 | const httpc_context *ctx |
---|
56 | ); |
---|
57 | |
---|
58 | bool httpc_ws_send_request( |
---|
59 | const httpc_context *ctx, |
---|
60 | const char *request, |
---|
61 | char *response, |
---|
62 | int responsesize |
---|
63 | ); |
---|
64 | |
---|
65 | #ifdef __cplusplus |
---|
66 | } |
---|
67 | #endif /* __cplusplus */ |
---|
68 | |
---|
69 | #endif /* TEST_WEB_CLIENT_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.