00001 /* 00002 * $Id$ 00003 * 00004 * Copyright (C) 2010 iptelorg GmbH 00005 * 00006 * Permission to use, copy, modify, and distribute this software for any 00007 * purpose with or without fee is hereby granted, provided that the above 00008 * copyright notice and this permission notice appear in all copies. 00009 * 00010 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 00011 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 00012 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 00013 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 00014 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 00015 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 00016 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 00017 */ 00023 /* 00024 * History: 00025 * -------- 00026 * 2010-05-18 initial version (andrei) 00027 */ 00028 00029 #ifndef __tcp_read_h 00030 #define __tcp_read_h 00031 00032 #include "tcp_conn.h" 00033 00034 #define RD_CONN_SHORT_READ 1 00035 #define RD_CONN_EOF 2 00036 #define RD_CONN_REPEAT_READ 4 /* read should be repeated (more data) 00037 (used so far only by tls) */ 00038 #define RD_CONN_FORCE_EOF 65536 00039 00040 int tcp_read_data(int fd, struct tcp_connection *c, 00041 char* buf, int b_size, int* flags); 00042 00043 00044 #endif /*__tcp_read_h*/ 00045 00046 /* vi: set ts=4 sw=4 tw=79:ai:cindent: */
1.7.1