Commit Graph
180 Commits
Author SHA1 Message Date
cpq 144c2f443e TLS layer: c->rtls to optimise recvd TLS data 2023-12-10 12:18:07 +00:00
Sergio R. Caprile 18d13f9848 Allow fast close 2023-11-02 18:27:39 -03:00
cpq bb9c7c0eb3 Handle ECOS case in accept_conn() 2023-10-06 15:58:26 +01:00
cpq 46ecb07fc8 Fix #2192 - honor addr%scopeid ipv6 notation 2023-09-29 15:49:47 +01:00
cpq 00d475bc7e Address https://github.com/cesanta/mongoose/discussions/2305 - bind to v6 only / v6 and v4 2023-09-21 12:35:47 +01:00
cpq 3f0366a514 Revert to the old TLS API, but keep certs as mg_str for DER 2023-09-19 11:15:23 +01:00
Sergio R. Caprile 7459d30a28 deprecate mg_mkpipe() 2023-08-17 18:05:03 -03:00
cpq 0613cc62f4 TLS API refactor 2023-07-25 13:07:28 +01:00
robert dd32deb2ad optimized mg_addr structure 2023-06-09 09:19:37 -04:00
cpq f961f993c8 FD_SETSIZE fix 2023-06-02 06:57:39 +01:00
cpq adf124c00c Dont check fd against FD_SETSIZE if POLL or EPOLL are used 2023-06-01 22:55:15 +01:00
Sergio R. Caprile ab10b042be fix bind issue in W 2023-05-22 19:13:48 -03:00
cpq 48333041f4 Apply SO_EXCLUSIVEADDRUSE and SO_REUSEADDR on windows 2023-05-12 14:08:49 +01:00
cpq 717c9dbe89 On Windows, prefer EXCLADDRINUSE, then REUSEADDR 2023-05-09 11:25:18 +01:00
cpq 9ade464c2e Fix #2089 - allow to bind v4 and v6 sockets on the same port 2023-04-18 08:26:18 +01:00
cpq d9f05532cd Address #2125: treat negative poll time as infinite wait 2023-04-10 15:04:37 +01:00
Sergio R. Caprile 8e14ad0536 Add printf.h 2023-04-07 19:28:00 -03:00
Sergio R. Caprile 8167291ffc Fix FreeRTOS-Plus-TCP 2023-03-24 15:28:32 -03:00
Sergio R. Caprile f4ed5062f6 Add arch for CMSIS-RTOS v1 and v2 2023-03-21 19:32:56 -03:00
cpq 1612e1d142 Better error handling for RL NET 2023-02-01 13:59:47 +00:00
cpq 4bf39e18d9 Add mg_print_ip, mg_print_ip_port helper functions 2023-01-29 14:30:06 +00:00
cpq da5e8e9778 Rename struct mg_connection::label -> data. Make its size configurable 2023-01-10 08:19:49 +00:00
cpq b01989f041 Fix #1888: add %I *printf specifier for IP address. Remove mg_ntoa, mg_straddr 2022-12-03 14:27:07 +00:00
cpq 804a3bf380 Fix #1801 - report ipv4 accepted address for ipv4 listeners 2022-11-11 14:01:17 +00:00
cpq 2192914cbb Create MG_ARCH_FREERTOS, MG_ENABLE_LWIP, MG_ENABLE_FREERTOS_TCP. Remove MG_ARCH_FREERTOS_TCP, MG_ARCH_RTX_LWIP 2022-11-07 23:58:58 +00:00
cpq f022633f29 Generalize socket constants 2022-11-05 12:33:49 +00:00
Sergio R. Caprile e9421d557a 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
2022-10-28 18:55:10 -03:00
cpq fd4e1975a3 Pass long *bytes_read to MG_EV_READ 2022-09-09 17:09:18 +01:00
cpq 124ac12150 Add mbedtls support to MIP 2022-09-09 15:53:42 +01:00
cpq c7b9ca68c2 Move mg_mqtt_next-* to the example, and some nits 2022-08-26 14:20:54 +01:00
cpq 779c825e92 Fixes to chunked support when pipelining 2022-08-05 19:18:06 +01:00
Sergey Lyubka 51cb40acd2 Enable epoll on linux 2022-08-03 15:07:26 +01:00
Sergey Lyubka 17e2fdd4cb Add align to struct mg_iobuf 2022-08-01 12:53:25 +01:00
Sergey Lyubka a468f58128 Use int debug level 2022-08-01 11:19:32 +01:00
Sergey Lyubka 2c01893bb1 Give more time for unit test to detect conn refused on windows 2022-07-04 19:18:20 +01:00
Sergey Lyubka 543b4a132b Fix POLLERR usage 2022-07-04 18:25:13 +01:00
Sergey Lyubka 6c796b8552 Fix memset in mg_iotest, add mg_random_str test 2022-07-04 16:13:38 +01:00
Sergey Lyubka 6c14c7d623 Unbreak mac build 2022-07-04 00:06:01 +01:00
Sergey Lyubka dca43f430b Fix poll support for win32 2022-07-02 12:45:44 +01:00
Sergey Lyubka 91fa2ad23b Enable poll support on windows 2022-07-02 11:52:16 +01:00
Sergey Lyubka f1da8542ce Nits 2022-07-01 17:28:06 +01:00
Sergey Lyubka 5b8979a0f1 Better connect() result test 2022-06-29 19:19:19 +01:00
Sergey Lyubka 89e2a15eb7 Fix build 2022-06-29 18:03:04 +01:00
Sergey Lyubka 017c7290d6 Better error handling - report from iotest 2022-06-29 17:02:37 +01:00
Sergey Lyubka 807cd4df9e Make sock.c less verbose 2022-06-08 19:55:24 +01:00
Sergey Lyubka 0f0cf7a5db Integrate #1579 - properly clear c->is_readable and c->is_writable flags in mg_iotest() 2022-06-05 15:27:16 +01:00
Sergey Lyubka 0763146254 Fix #1476 - introduce c->is_full to cap the recv buf len for streaming connections 2022-06-03 11:37:35 +01:00
Sergey Lyubka 5ac847076a Change long read_conn -> void read_conn 2022-06-02 14:02:09 +01:00
Sergey Lyubka a88ea776a9 Change MG_MAX_RECV_BUF_SIZE -> MG_MAX_RECV_SIZE 2022-06-02 13:50:44 +01:00
Sergey Lyubka a3d63c095a Handle #1562 - add udp/tcp extra param to mg_mkpipe() 2022-05-31 18:23:32 +01:00