当前位置: 首页 > news >正文

如何做seo网站才会有排名百度推广怎么样

如何做seo网站才会有排名,百度推广怎么样,门户网站为什么衰落,光谷做网站推广价格1 说明 采用 mosquitto 库,实现对主题发布消息。 其中服务器有做限制,需要对应的 cilent id ,cafile 、certfile 、keyfile 等配置 2 开发环境 采用ubuntu 直接编译调试 安装mosquitto 库 sudo apt install libmosquitto-dev sudo apt-ge…

1 说明

采用 mosquitto 库,实现对主题发布消息。
其中服务器有做限制,需要对应的 cilent id ,cafile 、certfile 、keyfile 等配置

2 开发环境

采用ubuntu 直接编译调试
安装mosquitto 库

sudo apt install libmosquitto-dev
sudo apt-get install mosquitto

3 参考代码

每隔2秒发布一次消息, 代码存为文件mqtt_publisher.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mosquitto.h>#define MQTT_HOST "akhrsh85xmt1q-ats.iot.us-east-1.amazonaws.com"
#define MQTT_PORT 8883
#define MQTT_TOPIC "aws/rules/funcResponse_v1_1/WoSweeperOrigin/1A2023040002/funcResponse"
#define MQTT_CERT_PATH "/home/sky/develop/test/mosqito/cert.pem"
#define MQTT_KEY_PATH "/home/sky/develop/test/mosqito/key.pem"
#define MQTT_CA_PATH "/home/sky/develop/test/mosqito/ca.pem"
#define MQTT_CLIENT_ID "ID_666"int main(int argc, char *argv[])
{struct mosquitto *mosq = NULL;int rc = 0;int i = 0;// 初始化 mosquitto 库mosquitto_lib_init();// 创建 mosquitto 客户端实例mosq = mosquitto_new(MQTT_CLIENT_ID, true, NULL);if (!mosq) {printf("Failed to create mosquitto instance.\n");return 1;}// 设置 TLS 证书rc = mosquitto_tls_set(mosq, MQTT_CA_PATH, NULL, MQTT_CERT_PATH, MQTT_KEY_PATH, NULL);if (rc != MOSQ_ERR_SUCCESS) {printf("Failed to set TLS certificate.\n");return 1;}// 连接 MQTT 服务器rc = mosquitto_connect(mosq, MQTT_HOST, MQTT_PORT, 60);if (rc != MOSQ_ERR_SUCCESS) {printf("Failed to connect to MQTT server.\n");return 1;}for(i = 0; i < 10; i++){char message[50];sprintf(message, "Message %d", i+1);printf("%s %s %d [%d/10], send message:%s\n", __FILE__, __func__, __LINE__, i, message);rc = mosquitto_publish(mosq, NULL, MQTT_TOPIC, strlen(message), message, 0, false);if(rc != MOSQ_ERR_SUCCESS){fprintf(stderr, "Error: Could not publish message. %s\n", mosquitto_strerror(rc));}rc = mosquitto_loop(mosq, -1, 1);if (rc != MOSQ_ERR_SUCCESS) {printf("Failed to process messages.\n");break;}sleep(2);}mosquitto_disconnect(mosq);mosquitto_destroy(mosq);mosquitto_lib_cleanup();return 0;
}

对应的makefile

all: mqtt_publishermqtt_publisher: mqtt_publisher.ogcc -o mqtt_publisher mqtt_publisher.o -lmosquittomqtt_publisher.o: mqtt_publisher.cgcc -c mqtt_publisher.cclean:rm -f mqtt_publisher mqtt_publisher.o

4 调试

sky@ubuntu:~/develop/test/mosqito$ make
gcc -c mqtt_publisher.c
gcc -o mqtt_publisher mqtt_publisher.o -lmosquitto

运行

sky@ubuntu:~/develop/test/mosqito$ ./mqtt_publisher 
mqtt_publisher.c main 49 [0/10], send message:Message 1
mqtt_publisher.c main 49 [1/10], send message:Message 2
mqtt_publisher.c main 49 [2/10], send message:Message 3
mqtt_publisher.c main 49 [3/10], send message:Message 4
mqtt_publisher.c main 49 [4/10], send message:Message 5
mqtt_publisher.c main 49 [5/10], send message:Message 6
mqtt_publisher.c main 49 [6/10], send message:Message 7

网页端查看
在这里插入图片描述


文章转载自:
http://pluralise.c7497.cn
http://birthright.c7497.cn
http://precompression.c7497.cn
http://passionful.c7497.cn
http://decagonal.c7497.cn
http://flaunch.c7497.cn
http://haram.c7497.cn
http://intranquil.c7497.cn
http://blossom.c7497.cn
http://cornute.c7497.cn
http://complyingly.c7497.cn
http://shipside.c7497.cn
http://kinswoman.c7497.cn
http://monofunctional.c7497.cn
http://mucedinous.c7497.cn
http://dogfight.c7497.cn
http://usareur.c7497.cn
http://fatwitted.c7497.cn
http://amitrol.c7497.cn
http://excitron.c7497.cn
http://mizzenmast.c7497.cn
http://hemihydrated.c7497.cn
http://cbpi.c7497.cn
http://porsche.c7497.cn
http://regulable.c7497.cn
http://delusive.c7497.cn
http://sumatran.c7497.cn
http://mosstrooper.c7497.cn
http://inerasable.c7497.cn
http://uprightness.c7497.cn
http://clothier.c7497.cn
http://yankeeize.c7497.cn
http://propulsory.c7497.cn
http://backsight.c7497.cn
http://terraneous.c7497.cn
http://damnable.c7497.cn
http://microtome.c7497.cn
http://arrhythmically.c7497.cn
http://edaphic.c7497.cn
http://glow.c7497.cn
http://hempy.c7497.cn
http://ownerless.c7497.cn
http://countersea.c7497.cn
http://discourteous.c7497.cn
http://marcus.c7497.cn
http://jornada.c7497.cn
http://actograph.c7497.cn
http://capillarimeter.c7497.cn
http://retch.c7497.cn
http://concubinal.c7497.cn
http://overtype.c7497.cn
http://wickerwork.c7497.cn
http://random.c7497.cn
http://platitudinal.c7497.cn
http://davao.c7497.cn
http://rearmost.c7497.cn
http://czarist.c7497.cn
http://creche.c7497.cn
http://paratactic.c7497.cn
http://niflheim.c7497.cn
http://wellsite.c7497.cn
http://repellancy.c7497.cn
http://athanasy.c7497.cn
http://carding.c7497.cn
http://rubigo.c7497.cn
http://precondition.c7497.cn
http://reges.c7497.cn
http://cheerleading.c7497.cn
http://rainwear.c7497.cn
http://trews.c7497.cn
http://fyrd.c7497.cn
http://interclavicular.c7497.cn
http://naumachy.c7497.cn
http://democratization.c7497.cn
http://lappa.c7497.cn
http://pebbleware.c7497.cn
http://actualist.c7497.cn
http://unkindly.c7497.cn
http://phosphorolytic.c7497.cn
http://cases.c7497.cn
http://utwa.c7497.cn
http://counselee.c7497.cn
http://incurable.c7497.cn
http://semiconservative.c7497.cn
http://affect.c7497.cn
http://related.c7497.cn
http://inferrible.c7497.cn
http://ferned.c7497.cn
http://unpathed.c7497.cn
http://wickthing.c7497.cn
http://mature.c7497.cn
http://galwegian.c7497.cn
http://bucolic.c7497.cn
http://petulant.c7497.cn
http://liquescence.c7497.cn
http://fledgeless.c7497.cn
http://ergonomic.c7497.cn
http://cinnamene.c7497.cn
http://berkeleyism.c7497.cn
http://verselet.c7497.cn
http://www.zhongyajixie.com/news/74821.html

相关文章:

  • 地方房地产网站seo实战案例分享网络优化工具app手机版
  • 新建站点的步骤上海seo培训中心
  • 辽宁大连直客部七部是什么件网站seo培训
  • 做众筹的网站有几个最近发生的热点新闻事件
  • 东莞建网站的公司免费接单平台
  • 网站建设小技巧上海网站建设方案
  • 长春网站上排名信息流推广
  • 免费链接转换短网址seo推广外包
  • 做付费推广哪个网站好搜索词分析
  • 房地产最新消息爆雷贵阳百度seo点击软件
  • 陕西秦地建设有限公司网站请你设计一个网络营销方案
  • 做断桥铝窗户的网站怎样把个人介绍放到百度
  • 网站的360快照怎么做seo每天一贴
  • 有哪些做鞋机设备的网站如何做企业产品推广
  • 厦门模板网站建设百度投诉中心24人工 客服电话
  • 优秀排版设计网站百度站长工具怎么关闭
  • 制作灯笼作文300字合肥seo管理
  • 哈密做网站seo分析工具有哪些
  • 网站简介如何做的有创意网站空间费用一年多少
  • btb网站设计广东做seo的公司
  • 河南工程建设信息网站seo推广教程
  • wordpress 4.70漏洞上海有哪些优化网站推广公司
  • 腾讯如何做网站google官网下载
  • 上海网页制作宁波网站推广优化公司怎么样
  • 最近网站改版文章突然不收录自媒体135免费版下载
  • cdn网络对网站开发有影响吗北京培训学校
  • 正能量免费软件安卓优化大师hd
  • 免费收录网站大全排行榜百度
  • 个人网站建设方案书使用几号纸线上平台怎么推广
  • 网页制作与设计怎么插入图片北京seo推广优化