mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Sockets were not being put in non-blocking mode as the setsockopt() call wasn't using SOL_SOCKET Do not include errno.h but serrno.h, otherwise error codes are mangled... NDK functions use serrno, errno belongs to the compiler UDP sockets require binding to receive responses select() does not return write-ready on connect if the amount of bytes to write is below the "low-water mark". This parameter defaults to 2048, there was some code apparently setting this otherwise, with no success. Reworked the code to set this water mark at half the buffer size by just using plain getsockopt/setsockopt calls. For the record: TI typedef's void * SOCKET for internal use, INVALID_SOCKET is cast to (void *). Their BSD compatible socket interface expects and returns int; while Mongoose uses SOCKET... this generates lots of warnings 169 and 515, disabled in the examples
20 lines
290 B
C
20 lines
290 B
C
#pragma once
|
|
|
|
#if MG_ARCH == MG_ARCH_TIRTOS
|
|
|
|
#include <stdlib.h>
|
|
#include <ctype.h>
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <time.h>
|
|
|
|
#include <serrno.h>
|
|
#include <sys/socket.h>
|
|
|
|
#include <ti/sysbios/knl/Clock.h>
|
|
|
|
#endif
|