Commit Graph

355 Commits

Author SHA1 Message Date
Marko Mikulicic
5045dfab74 Mongoose TCP tunnel
PUBLISHED_FROM=f03b963aaec02574e47c28ee8033551440b94f2d
2016-11-09 15:05:46 +00:00
Alexander Alashkin
d0c50632cd Fixes in MQTT for AWS support
PUBLISHED_FROM=2b82f3793b3c6d0cf1266e4cc0e67930f43002c5
2016-11-09 10:05:40 +00:00
Marko Mikulicic
fffb54e2c6 Implementing MG interfaces
PUBLISHED_FROM=46496c2d5340a0bbe4fe1c6c9ff187bc65d2d35f
2016-11-08 22:36:13 +00:00
Alexander Alashkin
cd778396ff Update mg_coap_add_option doc
PUBLISHED_FROM=cded8f36e2833e7c256ba6cbca0ebf1f6012dee7
2016-11-03 17:20:55 +00:00
Dmitry Frank
0798b72470 Add names to mg_event_handler_t's args
PUBLISHED_FROM=3caea25dec11260561349fa096547bd62ecdb509
2016-11-01 23:25:18 +00:00
Alexander Alashkin
e62dc8f3b2 Handle MG_EV_CLOSE in examples
PUBLISHED_FROM=57c62a4123a54ecb455dbf91f3fe562fb0cf2ec2
2016-11-01 08:58:38 +00:00
Sergey Lyubka
f1b4f0c463 Fix SEGFAULT in MQTT server
PUBLISHED_FROM=6455082726781aab819a7f8645e81adaa7fc7669
2016-10-28 14:12:40 +00:00
Deomid Ryabkov
5c9f463cab Add MG_EV_HTTP_MULTIPART_REQUEST_END
This event is sent at the end of the request

PUBLISHED_FROM=0b841a26320e3edbf73126e2ed8d286d4e5f3fa8
2016-10-27 18:09:57 +00:00
Sergey Lyubka
3a8f47befd Mqtt: parsing auth info in the connect message
PUBLISHED_FROM=017e707ea2bd7b1d1972fbb92e5d98c74e17e9d0
2016-10-27 17:53:17 +00:00
Marko Mikulicic
a4c668e37a Expose reverse proxy API for dynamic mounts
PUBLISHED_FROM=00772400bce7c15368d91741092ebc8ab0842e19
2016-10-27 12:08:05 +00:00
Marko Mikulicic
900bbe724a Mongoose forwarding
PUBLISHED_FROM=51652f0157bb951a43508f0fe948c62c351e96ba
2016-10-26 14:52:10 +00:00
Deomid Ryabkov
c6b5343c9b Target CC3200 example to production device
PUBLISHED_FROM=623dda0737c8426754044880713c1283c4b181b6
2016-10-26 10:39:04 +00:00
Sergey Lyubka
7f4e2a93d0 Sort docs API entries alphabetically
PUBLISHED_FROM=73ef8ae768585d3c204e6e022848f49e8f4a8de2
2016-10-26 08:28:07 +00:00
Deomid Ryabkov
a17eae4142 Enable MQTT client by default
PUBLISHED_FROM=cb5d5afe166f637082d4b1d1bce5d9c263e91fd0
2016-10-18 15:51:31 +00:00
Deomid Ryabkov
7b05d70042 CS_P_ESP_LWIP -> CS_P_ESP8266;add CS_P_NXP_KINETIS
LWIP part has been finally fully split from the ESP part, and ESP
platform defs reduced to bare minimum. It is now possible to use LWIP
in either low-level or socket mode without any ESP dependencies,
and NXP Kinetis platform is the first to make use of it.

PUBLISHED_FROM=4a9055897609c812296bdab5b4943ffde641ced2
2016-10-18 12:38:06 +00:00
Deomid Ryabkov
492dcdca8d MG_DISABLE_(DNS|(_SYNC)?_RESOLVER) -> MG_ENABLE_$1
Disable sync resolver by default.

PUBLISHED_FROM=dbaed194e5fe211c07564fe6880649a1aee7f662
2016-10-17 19:21:46 +00:00
Deomid Ryabkov
4ef3a778c1 Introduce MG_NET_IF var, replaces MG_NET_IF_*
Possible values:
  MG_NET_IF_SOCKET (1) - traditional BSD socket API
  MG_NET_IF_SIMPLELINK (2) - TI's SimpleLink socket interface
  MG_NET_IF_LWIP_LOW_LEVEL - a net_if implementation that uses LWIP's
    low-level API, when LWIP_SOCKET is not available.

PUBLISHED_FROM=a5c0aebb7b6bdb1f1f4cb3210763d16f3ab5e133
2016-10-17 18:21:58 +00:00
Deomid Ryabkov
37e4f51668 MG_DISABLE_SOCKETPAIR -> MG_ENABLE_BROADCAST
PUBLISHED_FROM=81b6289a4b54043df557142f0de8cc66bc5190d4
2016-10-17 04:07:06 +00:00
Deomid Ryabkov
1dae0373c8 MG_DISABLE_POPEN -> MG_ENABLE_HTTP_SSI_EXEC
PUBLISHED_FROM=55b2b70a688234f6ebcfba37eced20ee5d5387a1
2016-10-16 23:21:56 +00:00
Deomid Ryabkov
e928f36456 MG_DISABLE_HTTP(|_SSI|_WEBSOCKET) -> MG_ENABLE$1
Factor out SSI and WS code from http.c

HTTP + WS are enabled by default, but MQTT is built without HTTP
support as a compilation test.

PUBLISHED_FROM=925ed9a55abb193ed7deac1c9675a0e5b35dca50
2016-10-14 17:06:19 +00:00
Deomid Ryabkov
241090a82b CS_DISABLE_(STDIO|HEXDUMP) -> CS_ENABLE_$1
PUBLISHED_FROM=9fd0cebfa8df53b5d9574a8d013305ddda5e7a18
2016-10-14 10:22:30 +00:00
Deomid Ryabkov
3b69f5d500 MG_DISABLE_DAV -> MG_ENABLE_HTTP_WEBDAV
PUBLISHED_FROM=62267ea0a8e10d8ba7bad590d1a56b179bcffce9
2016-10-14 07:06:13 +00:00
Deomid Ryabkov
b298d46a40 MG_DISABLE_MQTT -> MG_ENABLE_MQTT
PUBLISHED_FROM=34e6028b68e286f81be7ba0f8ae73b760f144131
2016-10-13 21:08:22 +00:00
Deomid Ryabkov
bafc30bec6 Change from using #ifdef to #if for features tests
"#if FOO" still works with simple -DFOO, but gives more flexibility.
Specifically, if user expressed no preference (FOO is not defined),
we can apply reasonable defaults (this is the legitimate use of ifdef).

In short, from now on, please use

 #if MG_ENABLE_FOO

instead of

 #ifdef MG_ENABLE_FOO

Since we are all used to #ifdef, this change also adds a precommit check
to police this. Specifically, in *.h and *.c files that are Copyright Cesanta,
"ifdef" and "if defined()" are not allowed to be used with macros that contain
ENABLE or DISABLE, unless the like also contains "ifdef-ok".

Hence, if you are sure you want to use ifdef, use this:

 #ifdef MG_ENABLE_FOO /* ifdef-ok */

PUBLISHED_FROM=9be829448f53cff575d6cae8b9945fb12531c15a
2016-10-13 18:07:25 +00:00
Deomid Ryabkov
f9a6403b11 Add MG_EV_SSI_CALL_CTX
This is the variant of MG_EV_SSI_CALL with context of the SSI call being
processed in addition to the tag argument. Specifically, call handler
now gets access to the HTTP request and the name of the file being processed.

MG_EV_SSI_CALL is preserved for backward compatibility.

PUBLISHED_FROM=eeea7487c062505abdb23b6f64994ff7a6b60ff8
2016-10-04 23:51:29 +00:00
Deomid Ryabkov
8b12263dbc Fix mg_http_send_redirect doc
PUBLISHED_FROM=77cd3df9959b0e3a2550d1581586e69878bbee0d
2016-09-30 13:06:39 +00:00
Deomid Ryabkov
460d95afc5 Add mg_http_send_redirect and make examples use it
PUBLISHED_FROM=f45e06aeba1c00212078d539b6f74cb8bd054326
2016-09-30 11:22:00 +00:00
Alexander Alashkin
fecb11f2fa Add CoAP server example doc. Closes cesanta/dev#4917
PUBLISHED_FROM=ee7728db61721c0628a00ed702a47f7382ad7cd7
2016-09-29 11:50:59 +00:00
Alexander Alashkin
56e50c2dbe Add CoAP client example doc
PUBLISHED_FROM=51fd5cd50ae8c9fce43d95d06fec2e7582018d00
2016-09-29 11:05:59 +00:00
Marko Mikulicic
286fa90ee9 Simple mDNS + DNS-SD impl
Main TODOs:
1. the spec requires the impl to resend the reply once and
   to send gratuitous updates

2. advertise our clubby services as DNS-SD sub-services.

---

Tested with:

1. https://play.google.com/store/apps/details?id=com.grokkt.android.bonjour&hl=en
2. https://play.google.com/store/apps/details?id=com.druk.bonjour.browser&hl=en
3. osx `dns-sd`

Works well enough; it doesn't have some glitches due the fact that we
don't retransmit yet and we don't send gratuitous updates.

PUBLISHED_FROM=38d7a50beb274d4aeeda5b0b58e44dfa0789da84
2016-09-28 08:51:47 +00:00
Sergey Lyubka
d6dda04f4f Update mg_mgr docstring
PUBLISHED_FROM=da57dfe52e315dc1901d761289f0445be6e93cea
2016-09-13 11:37:47 +00:00
Artem Bulavin
1b0825ef4b Docs deployment via docs/make_doc
PUBLISHED_FROM=da5f7f80a9876ac4f1889a1176a3048f47980659
2016-09-13 11:37:46 +00:00
Sergey Lyubka
7249b2bd5f Update mg_mgr docstring
PUBLISHED_FROM=da57dfe52e315dc1901d761289f0445be6e93cea
2016-09-13 11:36:17 +00:00
Alexander Alashkin
4cbf81da59 Use user timeout in multithreading polling
PUBLISHED_FROM=dbf75bfba087f1b0aa0531e5003ba3e69ed1a6ab
2016-09-12 14:21:05 +00:00
Alexander Alashkin
d9b7ec18e7 Add MG_F_ENABLE_BROADCAST option
PUBLISHED_FROM=293a54ab09e6879b6f0c36975a137eeaeff92098
2016-09-12 12:36:56 +00:00
Dmitry Frank
2a541175b5 Use void arguments list consistently in C code
On my way, fixed a couple of cases where we had `()` in the header, and
non-empty argument list in the source file.

PUBLISHED_FROM=5519526cf84e2bbd425a726fcc112fea1a95cbf1
2016-09-05 15:51:19 +00:00
Sergey Lyubka
3640554503 Add DNS server example
PUBLISHED_FROM=0d71533fd475c152c29fe304ca95559512a6059d
2016-09-02 21:06:16 +00:00
Sergey Lyubka
12437fd7fe Refactor Mongoose documentation
PUBLISHED_FROM=e9a4e5c7b4a1d03b93a2a79e29de19e60e919929
2016-09-01 14:35:02 +00:00
Deomid Ryabkov
5fa544fc78 Make mg_http_serve_file public
A way to serve a single, specific file as opposed to the hairy monster
that is mg_serve_http.

PUBLISHED_FROM=6ed1bc487b9d41d212a5907337182f23b040aecf
2016-08-09 10:51:02 +00:00
Dmitry Frank
7b48859f8d Fix mongoose comment a little
PUBLISHED_FROM=542e7c82fa494bef52222495301ab53dce43cd8f
2016-08-04 19:51:10 +00:00
Dmitry Frank
e5da7440d7 Bring back JS precompilation to CC3200
We haven't actually _fixed_ evaluation of precompiled bcode from
non-mmapped memory: we just never free it. For sane use case (do not
evaluate the same file more than once) it should be acceptable.

PUBLISHED_FROM=a9ca2d8fa72e9c40c93415d060ee8db697caa225
2016-07-26 15:36:00 +00:00
Dmitry Frank
849ec1684a Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
2016-07-26 15:06:04 +00:00
Alexander Alashkin
4f210cd8eb Fix error messages and more
PUBLISHED_FROM=11c57fc5ece01686e9cecab5e3bfce54a2825836
2016-07-25 17:21:23 +00:00
Evelyn
285f75764c Update mg_match_prefix.md 2016-07-25 17:37:20 +01:00
Evelyn
3586203753 Update mg_next_comma_list_entry.md 2016-07-25 17:36:46 +01:00
Alexander Alashkin
e406de7e00 Remove extra error message
PUBLISHED_FROM=8b7fcfc1bc32ff9ff38e2904ddb730c83bf9fae4
2016-07-25 16:36:18 +00:00
Evelyn
53ed8502c9 Update mg_is_big_endian.md 2016-07-25 17:35:41 +01:00
Evelyn
ac8c756879 Update mg_avprintf.md 2016-07-25 17:35:27 +01:00
Evelyn
07faacdaf9 Update mg_hexdump_connection.md 2016-07-25 17:34:35 +01:00
Evelyn
8464844518 Update mg_hexdump.md 2016-07-25 17:34:03 +01:00
Evelyn
fe2d1ff027 Update mg_sock_addr_to_str.md 2016-07-25 17:33:17 +01:00
Evelyn
8d129e359e Update mg_conn_addr_to_str.md 2016-07-25 17:33:03 +01:00
Evelyn
39aa56457b Update mg_start_thread.md 2016-07-25 17:32:22 +01:00
Evelyn
8491d5da8b Update mg_open.md 2016-07-25 17:31:57 +01:00
Evelyn
681196e2c8 Update mg_fopen.md 2016-07-25 17:31:43 +01:00
Evelyn
836ad5ebab Update mg_stat.md 2016-07-25 17:31:28 +01:00
Evelyn
a3ea1eddfb Update mg_base64_decode.md 2016-07-25 17:30:59 +01:00
Evelyn
a2c06ac6ba Update mg_skip.md 2016-07-25 17:30:04 +01:00
Evelyn
a5c697fa2d Update mg_coap_parse.md 2016-07-25 17:28:59 +01:00
Evelyn
be199b4fe9 Update mg_coap_send_ack.md 2016-07-25 17:28:05 +01:00
Evelyn
cc15320cfe Update mg_coap_send_message.md 2016-07-25 17:27:50 +01:00
Evelyn
70bae59ec6 Update mg_coap_free_options.md 2016-07-25 17:27:31 +01:00
Evelyn
d4f3361805 Update mg_coap_add_option.md 2016-07-25 17:26:59 +01:00
Evelyn
332c855d40 Update mg_set_protocol_coap.md 2016-07-25 17:26:43 +01:00
Evelyn
01e3fa4d13 Update mg_mqtt_next.md 2016-07-25 17:26:26 +01:00
Evelyn
15a0f7a00a Update mg_mqtt_broker.md 2016-07-25 17:26:05 +01:00
Evelyn
a751adba2a Update mg_mqtt_broker_init.md 2016-07-25 17:25:21 +01:00
Evelyn
10eed010df Update mg_mqtt_next_subscribe_topic.md 2016-07-25 17:25:00 +01:00
Evelyn
033ca26216 Update mg_mqtt_pong.md 2016-07-25 17:24:19 +01:00
Evelyn
40793cbdce Update mg_mqtt_ping.md 2016-07-25 17:24:10 +01:00
Evelyn
48a1b2ec75 Update mg_mqtt_unsuback.md 2016-07-25 17:24:03 +01:00
Evelyn
1a55556c66 Update mg_mqtt_suback.md 2016-07-25 17:23:53 +01:00
Evelyn
3edd3ccbe6 Update mg_mqtt_pubcomp.md 2016-07-25 17:23:39 +01:00
Evelyn
194933e037 Update mg_mqtt_pubrel.md 2016-07-25 17:23:30 +01:00
Evelyn
38deaedaef Update mg_mqtt_pubrec.md 2016-07-25 17:23:15 +01:00
Evelyn
fc3dd5900c Update mg_mqtt_puback.md 2016-07-25 17:23:06 +01:00
Evelyn
b1213425d0 Update mg_mqtt_connack.md 2016-07-25 17:22:53 +01:00
Evelyn
40f0b450a8 Update mg_mqtt_disconnect.md 2016-07-25 17:22:43 +01:00
Evelyn
0bab3977a8 Update mg_mqtt_unsubscribe.md 2016-07-25 17:22:35 +01:00
Evelyn
2c46760b77 Update mg_mqtt_subscribe.md 2016-07-25 17:22:22 +01:00
Evelyn
878c9ae5ae Update mg_mqtt_publish.md 2016-07-25 17:22:11 +01:00
Evelyn
c8553de09e Update mg_send_mqtt_handshake_opt.md 2016-07-25 17:22:02 +01:00
Evelyn
6738858e11 Update mg_send_mqtt_handshake.md 2016-07-25 17:21:52 +01:00
Evelyn
61cd6ab86e Update mg_set_protocol_mqtt.md 2016-07-25 17:21:43 +01:00
Evelyn
77704b669a Update mg_dns_send_reply.md 2016-07-25 17:21:22 +01:00
Evelyn
770be613d7 Update mg_dns_reply_record.md 2016-07-25 17:20:33 +01:00
Evelyn
9790366449 Update mg_dns_create_reply.md 2016-07-25 17:19:44 +01:00
Evelyn
89f0a8c530 Update mg_set_protocol_dns.md 2016-07-25 17:18:19 +01:00
Evelyn
f72a06e25a Update mg_dns_uncompress_name.md 2016-07-25 17:17:35 +01:00
Evelyn
8b975533e5 Update mg_dns_encode_record.md 2016-07-25 17:15:49 +01:00
Evelyn
b32f7a9b57 Update mg_dns_copy_questions.md 2016-07-25 17:14:48 +01:00
Evelyn
e1e0083897 Update mg_dns_insert_header.md 2016-07-25 17:14:27 +01:00
Evelyn
ca08ac0e3c Update mg_send_dns_query.md 2016-07-25 17:14:13 +01:00
Evelyn
a5b85b4462 Update mg_dns_parse_record_data.md 2016-07-25 17:14:03 +01:00
Deomid Ryabkov
3feab3a16d No-JS mode refactoring
Now JS is controlled with a make variable as opposed to a proproc define.

This allows skipping compiling a whole bunch of files when JS is
disabled, e.g. whole freezing step on ESP, or compiling v7.c on CC3200
which takes a while only to be discarded in its entirety later.

Var name is SJ_ENABLE_JS (note change from disable logic to enable to be in line with other stuff). Default is 1, meaning JS is enabled.

Also changed clubby knob in the same way: SJ_ENABLE_CLUBBY, default is 1 as well.

PUBLISHED_FROM=105277e9536e423d6363a51ff9acea9550a9c496
2016-07-25 15:06:00 +00:00
Evelyn
5d76e57b81 Update mg_set_protocol_http_websocket.md 2016-07-25 15:08:27 +01:00
Alexander Alashkin
9101cd0339 Use lld for ID
PUBLISHED_FROM=1246247fc29eb9a75b986ff7bb2d2350a52c03fc
2016-07-22 16:26:31 +00:00
Evelyn
4b2d3f5f5b Update mg_http_check_digest_auth.md 2016-07-22 16:23:52 +01:00
Evelyn
482a471abb Update mg_file_upload_handler.md 2016-07-22 16:23:16 +01:00
Evelyn
4d90bb0d02 Update mg_register_http_endpoint.md 2016-07-22 16:22:15 +01:00