13 #include <sys/types.h>
14 #include <sys/socket.h>
18 #include <CFNetwork/CFSocketStream.h>
30 #define TW_TLS_INCLUDE "twAxTls.h"
35 #ifndef TW_LEAN_AND_MEAN
39 #define TW_LOGGER_BUF_SIZE 4096
40 #define TW_LOG(level, fmt, ...) twLog(level, fmt, ##__VA_ARGS__)
41 #define TW_LOG_HEX(msg, preamble, length) twLogHexString(msg, preamble, length)
42 #define TW_LOG_MSG(msg, preamble) twLogMessage(msg, preamble)
47 #ifndef ENABLE_HTTP_PROXY_SUPPORT
48 #define ENABLE_HTTP_PROXY_SUPPORT
50 #ifndef USE_NTLM_PROXY
51 #define USE_NTLM_PROXY
61 #define TW_LOGGER_BUF_SIZE 1
62 #define TW_LOG(level, fmt, ...)
63 #define TW_LOG_HEX(msg, preamble, length)
64 #define TW_LOG_MSG(msg, preamble)
66 #undef OFFLINE_MSG_STORE
67 #define OFFLINE_MSG_STORE 0
68 #undef ENABLE_HTTP_PROXY_SUPPORT
70 #undef ENABLE_FILE_XFER
71 #undef ENABLE_TUNNELING
82 #define TW_MUTEX pthread_mutex_t *
92 CFReadStreamRef readStream;
93 CFWriteStreamRef writeStream;
94 CFStreamClientContext ctx;
99 #define TW_SOCKET_TYPE iosStream*
100 #define TW_ADDR_INFO struct addrinfo
105 #define TICKS_PER_MSEC 1
110 #define TW_MALLOC(a) malloc(a)
111 #define TW_CALLOC(a, b) calloc(a,b)
112 #define TW_REALLOC(a, b) realloc(a, b)
113 #define TW_FREE(a) free(a)
118 #define TW_FOPEN(a,b) fopen(a,b)
119 #define TW_FCLOSE(a) fclose(a)
120 #define TW_FREAD(a,b,c,d) fread(a,b,c,d)
121 #define TW_FWRITE(a,b,c,d) fwrite(a,b,c,d)
122 #define TW_FSEEK(a,b,c) fseeko(a,b,c)
123 #define TW_FERROR(a) ferror(a)
124 #define TW_FTELL(a) ftell(a)
126 #define TW_FILE_HANDLE FILE*
127 #define TW_FILE_DELIM '/'
128 #define TW_FILE_DELIM_STR "/"
129 #define TW_FILE_CASE_SENSITVE TRUE
131 #define ERROR_NO_MORE_FILES 0
136 #define TW_THREAD_ID pthread_t
153 char * stringCopyInUTF8FromCFString(CFStringRef
string);
154 CFStringRef cFStringFromUTF8String(
char *
string);
155 void clearLastStreamError();
156 void setLastErrorFromReadStream(CFReadStreamRef stream);
157 void setLastErrorFromWriteStream(CFWriteStreamRef stream);
twSocket base type definition.
Definition: twOSPort.h:175
uint64_t DATETIME
Date/time type definition.
Definition: twLinux-openssl.h:76