source: rtems/testsuites/libtests/mghttpd01/test-http-client.h @ f42d429

4.115
Last change on this file since f42d429 was f42d429, checked in by Nick Withers <nick.withers@…>, on 12/15/14 at 02:26:31

Enable WebSocket? support in the Mongoose HTTP server

  • Property mode set to 100644
File size: 1.1 KB
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
23extern "C" {
24#endif /* __cplusplus */
25
26typedef struct
27{
28  int socket;
29  FILE *fd;
30}
31httpc_context;
32
33void httpc_init_context(
34  httpc_context *ctx
35);
36
37bool httpc_open_connection(
38  httpc_context *ctx,
39  const char *targethost,
40  int targetport
41);
42
43bool httpc_close_connection(
44  httpc_context *ctx
45);
46
47bool httpc_send_request(
48  const httpc_context *ctx,
49  const char *request,
50  char *response,
51  int responsesize
52);
53
54bool httpc_ws_open_connection(
55  const httpc_context *ctx
56);
57
58bool 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.