kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit f61bbe8ff42863af238573cd63d73b3ad16a9a30
parent a025f0fa8e71d804c45ea7369a54385c72340105
Author: Joris Vink <joris@coders.se>
Date:   Thu,  2 May 2013 15:14:00 +0200

move buf stuff back into kore.h, wont need it separately

Diffstat:
includes/buf.h | 33---------------------------------
includes/kore.h | 13+++++++++++++
src/buf.c | 1-
src/config.c | 1-
src/http.c | 1-
src/kore.c | 1-
src/module.c | 1-
src/net.c | 1-
src/spdy.c | 1-
src/utils.c | 1-
10 files changed, 13 insertions(+), 41 deletions(-)

diff --git a/includes/buf.h b/includes/buf.h @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2013 Joris Vink <joris@coders.se> - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef __H_BUF_H -#define __H_BUF_H - -#define KORE_BUF_INITIAL 128 -#define KORE_BUF_INCREMENT KORE_BUF_INITIAL - -struct kore_buf { - u_int8_t *data; - u_int32_t length; - u_int32_t offset; -}; - -struct kore_buf *kore_buf_create(u_int32_t); -void kore_buf_append(struct kore_buf *, u_int8_t *, u_int32_t); -u_int8_t *kore_buf_release(struct kore_buf *, u_int32_t *); - -#endif /* !__H_BUF_H */ diff --git a/includes/kore.h b/includes/kore.h @@ -97,6 +97,15 @@ struct kore_module_handle { TAILQ_ENTRY(kore_module_handle) list; }; +#define KORE_BUF_INITIAL 128 +#define KORE_BUF_INCREMENT KORE_BUF_INITIAL + +struct kore_buf { + u_int8_t *data; + u_int32_t length; + u_int32_t offset; +}; + extern int server_port; extern char *server_ip; @@ -135,6 +144,10 @@ int net_recv_expand(struct connection *c, struct netbuf *, size_t, void net_send_queue(struct connection *, u_int8_t *, size_t, int, struct netbuf **, int (*cb)(struct netbuf *)); +struct kore_buf *kore_buf_create(u_int32_t); +void kore_buf_append(struct kore_buf *, u_int8_t *, u_int32_t); +u_int8_t *kore_buf_release(struct kore_buf *, u_int32_t *); + struct spdy_header_block *spdy_header_block_create(int); struct spdy_stream *spdy_stream_lookup(struct connection *, u_int32_t); int spdy_stream_get_header(struct spdy_header_block *, diff --git a/src/buf.c b/src/buf.c @@ -33,7 +33,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" diff --git a/src/config.c b/src/config.c @@ -34,7 +34,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" diff --git a/src/http.c b/src/http.c @@ -34,7 +34,6 @@ #include <time.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" #include "http.h" diff --git a/src/kore.c b/src/kore.c @@ -35,7 +35,6 @@ #include <time.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" #include "http.h" diff --git a/src/module.c b/src/module.c @@ -36,7 +36,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" diff --git a/src/net.c b/src/net.c @@ -34,7 +34,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" diff --git a/src/spdy.c b/src/spdy.c @@ -33,7 +33,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h" #include "http.h" diff --git a/src/utils.c b/src/utils.c @@ -33,7 +33,6 @@ #include <string.h> #include <zlib.h> -#include "buf.h" #include "spdy.h" #include "kore.h"