资源简介
支持文件传输,文字聊天,上下线通知,运行程序后,程序显示天气预报(http请求)
代码片段和文件信息
/*
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
Permission is hereby granted free of charge to any person obtaining a copy
of this software and associated documentation files (the “Software“) to deal
in the Software without restriction including without limitation the rights
to use copy modify merge publish distribute sublicense and/or sell
copies of the Software and to permit persons to whom the Software is
furnished to do so subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* cJSON */
/* JSON parser in C. */
#ifdef __GNUC__
#pragma GCC visibility push(default)
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#ifdef __GNUC__
#pragma GCC visibility pop
#endif
#include “cJSON.h“
/* define our own boolean type */
#define true ((cJSON_bool)1)
#define false ((cJSON_bool)0)
typedef struct {
const unsigned char *json;
size_t position;
} error;
static error global_error = { NULL 0 };
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void)
{
return (const char*) (global_error.json + global_error.position);
}
/* This is a safeguard to prevent copy-pasters from using incompatible C and header files */
#if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 5) || (CJSON_VERSION_PATCH != 7)
#error cJSON.h and cJSON.c have different versions. Make sure that both have the same.
#endif
CJSON_PUBLIC(const char*) cJSON_Version(void)
{
static char version[15];
sprintf(version “%i.%i.%i“ CJSON_VERSION_MAJOR CJSON_VERSION_MINOR CJSON_VERSION_PATCH);
return version;
}
/* Case insensitive string comparison doesn‘t consider two NULL pointers equal though */
static int case_insensitive_strcmp(const unsigned char *string1 const unsigned char *string2)
{
if ((string1 == NULL) || (string2 == NULL))
{
return 1;
}
if (string1 == string2)
{
return 0;
}
for(; tolower(*string1) == tolower(*string2); (void)string1++ string2++)
{
if (*string1 == ‘\0‘)
{
return 0;
}
}
return tolower(*string1) - tolower(*string2);
}
typedef struct internal_hooks
{
void *(*allocate)(size_t size);
void (*deallocate)(void *pointer);
void *(*reallocate)(void *pointer size_t size);
} internal_hooks;
static inter
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 67416 2018-12-10 19:23 飞秋C语言实现\源码\cJSON.c
文件 39471 2018-12-10 19:23 飞秋C语言实现\源码\cJSON_Utils.c
文件 13730 2018-12-10 19:23 飞秋C语言实现\源码\include\cJSON.h
文件 3814 2018-12-10 19:23 飞秋C语言实现\源码\include\cJSON_Utils.h
文件 7423 2017-11-10 19:37 飞秋C语言实现\源码\kernel_list.h
文件 36112 2018-12-10 19:23 飞秋C语言实现\源码\lib\cJSON.o
文件 41448 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson.so
文件 41448 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson.so.1
文件 41448 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson.so.1.5.7
文件 27680 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson_utils.so
文件 27680 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson_utils.so.1
文件 27680 2018-12-10 19:23 飞秋C语言实现\源码\lib\libcjson_utils.so.1.5.7
文件 62520 2018-12-10 19:35 飞秋C语言实现\源码\loin_msg
文件 21769 2018-12-10 19:35 飞秋C语言实现\源码\loin_msg.c
文件 411791 2018-12-10 20:54 飞秋C语言实现\说明文档.docx
目录 0 2018-12-29 15:32 飞秋C语言实现\源码\include
目录 0 2018-12-29 15:32 飞秋C语言实现\源码\lib
目录 0 2018-12-29 15:32 飞秋C语言实现\源码
目录 0 2018-12-29 15:32 飞秋C语言实现
----------- --------- ---------- ----- ----
871430 19
相关资源
- 基于STM32F407的W5500 tcpserver(官网例程
- 基于CS的TCP文件传输程序设计
- TCP/IP客户端和服务器端源代码,好用
- modbus tcp/ip 简单通讯
- libnet发送udp和tcp包
- socket tcp应用
- TCP/IP与串口调试
- Tcp自定义命令调试工具
- Qt TCP聊天室demo
- TCP服务端和TCP客户端通讯
- MFC UDP编程
- 使用socket套接字发送udp数据包
- 基于TCP协议的C/S传输文件C++)
- C语言实现TCP/IP协议通信和UDP协议通信
- c语言+UDP+DES加密+socket编程
- 基于udp的socket编程
- MFC下TCP服务器
- 基于TCP协议的文件传输编程
- TCP实现服务器和多客户端通信
- VC++6.0多人网络小游戏-支持多人联机网
- RakNet 基于UDP网络传输协议的C++网络库
- 基于UDP的简单可视化界面聊天程序c
- 基于TCP/IP socket的局域网聊天系统
- vc-基于MFC编程,使用TCP/IP模型编写
- Windows下基于ModbusTcp的Server端开发C语言
- 计算机网络实验设计---基于TCP的网络
- 基于TCP协议VC++6.0实现的聊天程序
- 基于MFC的TCP通信程序
- 基于VC++6.0的UDP通讯
- tcp客户端程序之mfc实现
评论
共有 条评论