00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef CDDB_NET_H
00023 #define CDDB_NET_H 1
00024
00025
#ifdef __cplusplus
00026
extern "C" {
00027
#endif
00028
00029
00030
#include <stdarg.h>
00031
00032
#if defined( UNDER_CE )
00033
# include <winsock.h>
00034
#elif defined( WIN32 )
00035
# include <winsock2.h>
00036
# include <ws2tcpip.h>
00037
#endif
00038
00039
#include <cddb/cddb_ni.h>
00040
#include <cddb/cddb_config.h>
00041
00042
#if defined(CDDB_NEED_SYS_SOCKET_H) || defined(HAVE_SYS_SOCKET_H)
00043
#include <sys/socket.h>
00044
#endif
00045
00046
00047
00048
00049
00061
char *
sock_fgets(
char *s,
int size,
cddb_conn_t *c);
00062
00074 size_t
sock_fwrite(
const void *ptr, size_t size, size_t nmemb,
cddb_conn_t *c);
00075
00085
int sock_fprintf(
cddb_conn_t *c,
const char *format, ...);
00086
00098
int sock_vfprintf(
cddb_conn_t *c,
const char *format, va_list ap);
00099
00100
00101
00112
struct hostent *
timeout_gethostbyname(
const char *hostname,
int timeout);
00113
00125
int timeout_connect(
int sockfd,
const struct sockaddr *addr, size_t len,
00126
int timeout);
00127
00128
00129
#ifdef __cplusplus
00130
}
00131
#endif
00132
00133
#endif