3 /***************************************************************************
5 * Project ___| | | | _ \| |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
10 * Copyright (C) 1998 - 2010, 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.
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<<0)
52 #define CLIENTWRITE_HEADER (1<<1)
53 #define CLIENTWRITE_BOTH (CLIENTWRITE_BODY|CLIENTWRITE_HEADER)
55 CURLcode Curl_client_write(struct connectdata *conn, int type, char *ptr,
58 CURLcode Curl_rtp_client_write(struct connectdata *conn, char *ptr, size_t len);
60 /* internal read-function, does plain socket only */
61 int Curl_read_plain(curl_socket_t sockfd,
63 size_t bytesfromsocket,
66 /* internal read-function, does plain socket, SSL and krb4 */
67 int Curl_read(struct connectdata *conn, curl_socket_t sockfd,
68 char *buf, size_t buffersize,
70 /* internal write-function, does plain socket, SSL, SCP, SFTP and krb4 */
71 CURLcode Curl_write(struct connectdata *conn,
73 const void *mem, size_t len,
76 /* internal write-function, does plain sockets ONLY */
77 CURLcode Curl_write_plain(struct connectdata *conn,
79 const void *mem, size_t len,
82 /* the function used to output verbose information */
83 int Curl_debug(struct SessionHandle *handle, curl_infotype type,
84 char *data, size_t size,
85 struct connectdata *conn);
88 #endif /* __SENDF_H */