37 #if defined(_WIN32) || defined(_WIN64) 160 if (def_queue->
socket == socket)
191 if (bytes > queue->
buflen)
195 void* newmem =
malloc(bytes);
234 else if (queue->
index > 4)
294 return def_queue->
buf;
311 else if (def_queue->
socket == 0)
314 def_queue->
index = 0;
317 else if (def_queue->
socket != socket)
324 Log(
LOG_FATAL, -1,
"socket queue fixed_header field full");
370 for (i = 0; i <
count; i++)
372 pw->
iovecs[i] = iovecs[i];
373 pw->
frees[i] = frees[i];
436 pw->
iovecs[3].iov_base = payload;
char * SocketBuffer_getQueuedData(int socket, size_t bytes, size_t *actual_len)
static socket_queue * def_queue
int SocketBuffer_newDefQ(void)
pending_writes * SocketBuffer_updateWrite(int socket, char *topic, char *payload)
int SocketBuffer_initialize(void)
#define PAHO_MEMORY_ERROR
void SocketBuffer_queueChar(int socket, char c)
#define SOCKETBUFFER_COMPLETE
static l_noret error(LoadState *S, const char *why)
void ListZero(List *newl)
int ListRemove(List *aList, void *content)
int ListDetach(List *aList, void *content)
void ListEmpty(List *aList)
int pending_socketcompare(void *a, void *b)
ListElement * ListNextElement(List *aList, ListElement **pos)
void SocketBuffer_interrupted(int socket, size_t actual_len)
int ListRemoveItem(List *aList, void *content, int(*callback)(void *, void *))
void Log(enum LOG_LEVELS log_level, int msgno, const char *format,...)
void SocketBuffer_terminate(void)
void SocketBuffer_freeDefQ(void)
ListElement * ListAppend(List *aList, void *content, size_t size)
int SocketBuffer_writeComplete(int socket)
#define SOCKETBUFFER_INTERRUPTED
int SocketBuffer_getQueuedChar(int socket, char *c)
int socketcompare(void *a, void *b)
pending_writes * SocketBuffer_getWrite(int socket)
char * SocketBuffer_complete(int socket)
List * ListInitialize(void)
ListElement * ListFindItem(List *aList, void *content, int(*callback)(void *, void *))
void ListFree(List *aList)
int SocketBuffer_pendingWrite(int socket, int count, iobuf *iovecs, int *frees, size_t total, size_t bytes)
void SocketBuffer_cleanup(int socket)