mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-23 20:11:49 +00:00
Fix TI-RTOS port
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
This commit is contained in:
1 parent
bbc0c0df94
commit
e9421d557a
4 files changed
+26
-26
No files matched your search
+1
-5
@@ -420,16 +420,12 @@ struct timeval {
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <serrno.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <ti/sysbios/knl/Clock.h>
|
||||
|
||||
extern int SockStatus(SOCKET hSock, int request, int *results );
|
||||
extern int SockSet(SOCKET hSock, int Type, int Prop, void *pbuf, int size);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user