3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
12 * This software is licensed as described in the file COPYING, which
13 * you should have received as part of this distribution. The terms
14 * are also available at http://curl.haxx.se/docs/copyright.html.
16 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
17 * copies of the Software, and permit persons to whom the Software is
18 * furnished to do so, under the terms of the COPYING file.
20 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21 * KIND, either express or implied.
23 * $Id: sendf.h,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
24 ***************************************************************************/
28 CURLcode
Curl_sendf(curl_socket_t sockfd
, struct connectdata
*,
29 const char *fmt
, ...);
30 void Curl_infof(struct SessionHandle
*, const char *fmt
, ...);
31 void Curl_failf(struct SessionHandle
*, const char *fmt
, ...);
33 #if defined(CURL_DISABLE_VERBOSE_STRINGS)
35 #if defined(HAVE_VARIADIC_MACROS_C99)
36 #define infof(...) do { } while (0)
37 #elif defined(HAVE_VARIADIC_MACROS_GCC)
38 #define infof(x...) do { } while (0)
43 #else /* CURL_DISABLE_VERBOSE_STRINGS */
45 #define infof Curl_infof
47 #endif /* CURL_DISABLE_VERBOSE_STRINGS */
49 #define failf Curl_failf
51 #define CLIENTWRITE_BODY 1
52 #define CLIENTWRITE_HEADER 2
53 #define CLIENTWRITE_BOTH (CLIENTWRITE_BODY|CLIENTWRITE_HEADER)
55 CURLcode
Curl_client_write(struct connectdata
*conn
, int type
, char *ptr
,
58 void Curl_read_rewind(struct connectdata
*conn
,
59 size_t extraBytesRead
);
61 /* internal read-function, does plain socket, SSL and krb4 */
62 int Curl_read(struct connectdata
*conn
, curl_socket_t sockfd
,
63 char *buf
, size_t buffersize
,
65 /* internal write-function, does plain socket, SSL, SCP, SFTP and krb4 */
66 CURLcode
Curl_write(struct connectdata
*conn
,
68 const void *mem
, size_t len
,
71 /* internal write-function, does plain sockets ONLY */
72 CURLcode
Curl_write_plain(struct connectdata
*conn
,
74 const void *mem
, size_t len
,
77 /* the function used to output verbose information */
78 int Curl_debug(struct SessionHandle
*handle
, curl_infotype type
,
79 char *data
, size_t size
,
80 struct connectdata
*conn
);
83 #endif /* __SENDF_H */