Sha256: 1c88204deda2e727c3aadc8310606752e2b87575d656cb5d775a76d734e60b32

Contents?: true

Size: 1.46 KB

Versions: 6

Compression:

Stored size: 1.46 KB

Contents

/* WebROaR - Ruby Application Server - http://webroar.in/
 * Copyright (C) 2009  Goonj LLC
 *
 * This file is part of WebROaR.
 *
 * WebROaR is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * WebROaR is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with WebROaR.  If not, see <http://www.gnu.org/licenses/>.
 */
#ifndef WKR_HTTP_RESPONSE_H_
#define WKR_HTTP_RESPONSE_H_

#include <wkr_http_request.h>

typedef struct http_resp_s    http_resp_t;

/******* HTTP Response  ******/
struct http_resp_s {
  wr_u_short         resp_code;
  size_t            bytes_write;
  scgi_t    *scgi;
  wr_buffer_t       *resp_body;
  wr_str_t          header;
#ifdef _POSIX_C_SOURCE
  int              file;
#else  
  FILE              *file;
#endif
  
};

http_resp_t* http_resp_new();
void http_resp_free(http_resp_t**);
void http_resp_set(http_resp_t*);
int http_resp_body_add(http_resp_t*, const char* , size_t);
int http_resp_process(http_resp_t*);
void http_resp_scgi_write_cb(struct ev_loop*, struct ev_io*, int);


#endif /*WKR_HTTP_RESPONSE_H_*/

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
webroar-0.3.1 src/worker/wkr_http_response.h
webroar-0.3.0 src/worker/wkr_http_response.h
webroar-0.2.6 src/worker/wkr_http_response.h
webroar-0.2.5 src/worker/wkr_http_response.h
webroar-0.2.4 src/worker/wkr_http_response.h
webroar-0.2.3 src/worker/wkr_http_response.h