MinnowServer-master
所属分类:网络编程
开发工具:C/C++
文件大小:29993KB
下载次数:8
上传日期:2020-07-21 17:50:20
上 传 者:
6931074
说明: 一个纯C实现的服务器端,包含WebSocket Server 及 Http Server,两个服务使用一个端口,唯一缺点使用的单线程,需要开发WebSocket及Http服务的可以参考。在VS2017下编译通过。这个源码绝对珍贵极具参考价值。
(A pure C implementation of the server side, including websocket server and HTTP server, two services use a port, the only disadvantage of using a single thread, need to develop websocket and HTTP services can refer to. It was compiled and passed under vs2017. This source code is absolutely precious and has reference value.)
文件列表:
SMQ\examples\led-host-sim.ch (11259, 2019-11-08)
SMQ\examples\ledctrl.h (5564, 2019-11-08)
SMQ\examples\m2m-led.c (28260, 2019-11-08)
SMQ\LICENSE (14199, 2019-11-08)
SMQ\Makefile (1031, 2019-11-08)
SMQ\revision.txt (44, 2019-11-08)
SMQ\src\arch\FreeRTOS-TCP\selibplat.h (4662, 2019-11-08)
SMQ\src\arch\Harmony\seHarmony.c (6822, 2019-11-08)
SMQ\src\arch\Harmony\selibplat.h (2139, 2019-11-08)
SMQ\src\arch\lwIP\selibplat.h (1898, 2019-11-08)
SMQ\src\arch\lwIP\seLwIP.c (4824, 2019-11-08)
SMQ\src\arch\lwIP-raw\selibplat.h (2444, 2019-11-08)
SMQ\src\arch\lwIP-raw\seLwIP.c (11656, 2019-11-08)
SMQ\src\arch\MDK\selibplat.h (4095, 2019-11-08)
SMQ\src\arch\MQX\selibplat.h (3762, 2019-11-08)
SMQ\src\arch\NetX\selibplat.h (2019, 2019-11-08)
SMQ\src\arch\NetX\seNetX.c (9547, 2019-11-08)
SMQ\src\arch\Posix\selibplat.h (3736, 2019-11-08)
SMQ\src\arch\uip\selibplat.h (2295, 2019-11-08)
SMQ\src\arch\uip\seuip.c (8532, 2019-11-08)
SMQ\src\arch\Windows\selibplat.h (3701, 2019-11-08)
SMQ\src\SeCtx.c (4095, 2019-11-08)
SMQ\src\SeCtx.h (3733, 2019-11-08)
SMQ\src\selib.c (9334, 2020-07-21)
SMQ\src\selib.h (7515, 2019-11-08)
SMQ\src\SMQ.h (19919, 2019-11-08)
SMQ\src\SMQClient.c (16705, 2019-11-08)
SMQ\VcMake\m2m-led.vcxproj (4004, 2019-11-08)
SMQ\VcMake\SMQClient.sln (860, 2019-11-08)
JSON\examples\ledctrl.h (2584, 2019-01-14)
JSON\examples\m2m-led.c (23484, 2019-01-14)
JSON\examples\solib.c (3778, 2019-01-14)
JSON\examples\solib.h (4864, 2019-01-14)
JSON\examples\StaticAllocatorEx.cpp (7352, 2019-01-14)
... ...
# SMQ C Client Library
SMQ C client library for microcontrollers. The library includes porting layers for many RTOS environments, including bare metal.
SMQ, based on the publish - subscribe pattern, provides features similar to other pub/sub protocols such as MQTT. However, SMQ extends the pub/sub pattern with additional features such as one-to-one messaging and sender's address, features typically required in device management.
**[See the SMQ home page for details](https://realtimelogic.com/products/simplemq/)**
# TL;DR; IoT Quickstart
Setup your own IoT solution as follows:
1. Download and compile the example code "as is". The example, when run, connects to the [online test broker](https://simplemq.com/m2m-led/).
2. Familiarize yourself with how the example works.
3. Follow the Setting up a [Low Cost SMQ IoT Broker](https://makoserver.net/articles/Setting-up-a-Low-Cost-SMQ-IoT-Broker) for how to setup your own IoT solution.
4. Modify the example code (examples/m2m-led.c) and change the domain URL (SMQ_DOMAIN). The URL should be set to your own IoT server.
# License
The source code is released under the **Eclipse Public License - V 2.0**: [https://www.eclipse.org/legal/epl-v20.html](https://www.eclipse.org/legal/epl-v20.html)
You may compile a Program licensed under the EPL without modification and commercially license the result in accordance with the [terms of the EPL](https://www.eclipse.org/legal/epl-2.0/faq.php).
This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: **GNU General Public License, version 2**.
# Documentation
* [SMQ documentation](https://realtimelogic.com/ba/doc/?url=SMQ.html)
* [SMQ C client library reference manual](https://realtimelogic.com/ba/doc/en/C/reference/html/group__SMQClient.html)
# Compiling
The build includes the SMQ library and a LED demonstration program. The LED demonstration program connects to the [online public test broker](https://realtimelogic.com/IoT-LED-Cluster.html). Initially, you may want to test the LED example by compiling and running the example code using the [ready-to-use online C compiler setup](https://repl.it/@RTL/SMQ-LED-Demo). See the following video for details on using the online compiler.
[![Compile SMQ](https://img.youtube.com/vi/qQ50565LN_M/0.jpg)](https://www.youtube.com/watch?v=qQ50565LN_M)
## Build instructions for Windows, Linux, and Mac
The VcMake directory contains Visual Studio build files. The included Makefile compiles the library and the example program on any Linux/Mac computer. If you are using Windows and if you do not have Visual Studio installed, you may download the batch file [DownloadAndCompileSMQ.bat](https://realtimelogic.com/downloads/SMQ/DownloadAndCompileSMQ.bat). This batch file downloads the SMQ C code from GitHub, downloads the Tiny C Compiler (TCC), compiles the SMQ code using TCC, and starts the SMQ LED example.
## Build instructions for embedded systems
The example code m2m-led.c requires porting to your embedded board's LED(s). See the tutorial [Interfacing LED Demo Programs to Hardware](https://realtimelogic.com/ba/doc/en/C/shark/md_md_Examples.html#LedDemo) for details.
See the src/arch directory for cross compiling details.
### Build instructions for ESP8266
Download the [ESP8266 IDE](https://realtimelogic.com/downloads/sharkssl/ESP8266/). The IDE includes the SMQ C client and a pre-configured esp-open-rtos bundled with an easy to use web-based C source code IDE.
近期下载者:
相关文件:
收藏者: