Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
HttpRecData.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 ****************************************************************************
11 * HEADER
12 *
13 * $Id: HttpRecData.h 5978 2026-09-11 16:13:48Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2006-2008
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://www.realtimelogic.com
33 ****************************************************************************
34 *
35 */
36
39#ifndef _HttpRecData_h
40#define _HttpRecData_h
41
42
43#include <HttpServer.h>
44
79typedef struct HttpRecData
80{
81#ifdef __cplusplus
82
98 static SBaFileSize valid(HttpRequest* req);
99
100
110
114 ~HttpRecData();
115
129 S32 read(void* buf, S32 bufSize);
130#endif
131 HttpRequest* req;
132 HttpConnection* con;
133 SBaFileSize sizeLeft;
134 SBaFileSize bufSize;
135 SBaFileSize readPos;
136 SBaFileSize chunkSize;
138
139#ifdef __cplusplus
140extern "C" {
141#endif
153BA_API S32 HttpRecData_read(HttpRecData* o, void* buf, S32 bufSize);
154#ifdef __cplusplus
155}
157 return HttpRecData_valid(req);
158}
160 HttpRecData_constructor(this, req);
161}
162inline S32 HttpRecData::read(void* buf, S32 bufSize) {
163 return HttpRecData_read(this, buf, bufSize);
164}
167}
168#endif
169 /* end of HttpStack */
171
172#endif
BA_API void HttpRecData_constructor(HttpRecData *o, HttpRequest *req)
The constructor is typically run by creating an object on the stack.
S32 read(void *buf, S32 bufSize)
Read data from socket.
Definition: HttpRecData.h:162
BA_API void HttpRecData_destructor(HttpRecData *o)
Finish reading, terminating the connection if unread body bytes remain.
BA_API S32 HttpRecData_read(HttpRecData *o, void *buf, S32 bufSize)
Read data from socket.
struct HttpRecData HttpRecData
The HttpRecData class makes it easy to upload packets or large data chunks when using Barracuda in mu...
BA_API SBaFileSize HttpRecData_valid(HttpRequest *req)
This method validates the client HTTP request.
HttpRecData(HttpRequest *req)
The constructor is typically run by creating an object on the stack.
Definition: HttpRecData.h:159
static SBaFileSize valid(HttpRequest *req)
This method validates the client HTTP request.
Definition: HttpRecData.h:156
~HttpRecData()
Finish using the reader.
Definition: HttpRecData.h:165
S32 SBaFileSize
Signed file-size value in bytes; 32 bits without BA_FILESIZE64.
Definition: GenPrimT.h:138
int32_t S32
Signed 32-bit integer.
Definition: GenPrimT.h:85
Contains information about the physical socket connection.
Definition: HttpConnection.h:80
The HttpRecData class makes it easy to upload packets or large data chunks when using Barracuda in mu...
Definition: HttpRecData.h:80
The HttpServer creates an HttpRequest object when the HttpServer parses a client request.
Definition: HttpServer.h:950