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

网站每年都要备案吗搜索引擎优化什么意思

网站每年都要备案吗,搜索引擎优化什么意思,wordpress视频试看付费,wordpress 半透明1.概述 本地套接字 1:作用:本地的进程间通信 2.有关系的进程间通信 3.没有关系的进程间的通信 本地套结字实现流程和网络套结字实现相似,一般采用tcp 二.通信流程 本地套结字通信的流程:1.服务器端:1.1 int fd socket(AF_UNIX/AF_LOCAL,…

1.概述

本地套接字
    1:作用:本地的进程间通信
    2.有关系的进程间通信
    3.没有关系的进程间的通信
本地套结字实现流程和网络套结字实现相似,一般采用tcp
 

 二.通信流程

本地套结字通信的流程:1.服务器端:1.1 int fd = socket(AF_UNIX/AF_LOCAL,SOCKET_STREAM,0)1.2 监听的套结字需要绑定本地的套结字文件struct sockaddr_un addr;绑定成功后指定的sun_path中的套结字文件会自动生成bind(fd,addr,len);1.3 监听listen(fd,100);1.4等待并接收连接请求struct sockaddr_un cliaddr;int cfd = accept(fd,&cliaddr,&len)1.5通信recv send1.6关闭客户端1. int fd = socket(AF_LOCAL,SOCKET_STREAM,0)2. 绑定成功后指定的sun_path中的套结字文件会自动生成struct sockaddr_un addr;bind(fd,addr,len)3.连接struct sockaddr_un serveraddr;connect(fd,&serveraddr,len);4.通信5.关闭

三.实例代码实现

3.1 server

#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>#include <sys/un.h>int main()
{unlink("server.sock");//解决报错:bind: Address already in useint sockfd =  socket(AF_LOCAL,SOCK_STREAM,0);if(sockfd == -1){perror("socket");exit(-1);}struct sockaddr_un server;server.sun_family = AF_LOCAL;strcpy(server.sun_path,"server.sock");if(bind(sockfd,(const struct sockaddr*)&server,sizeof(server)) == -1){perror("bind");exit(-1);}if(listen(sockfd, 100) == -1){perror("listen");exit(-1);}struct sockaddr_un client;int len = sizeof(client);int client_fd = accept(sockfd,(struct sockaddr*)&client,&len);if(client_fd == -1){perror("accept");exit(-1);}char recvbuff[1024] = {0};char *server_data = "i am server";while(1){memset(recvbuff,0,sizeof(recvbuff));len = recv(client_fd,recvbuff,sizeof(recvbuff),0);if(len == -1){perror("recv");break;}else if(len == 0){printf("客户端断开连接\n");}else if(len > 0){printf("recv client data : %s\n",recvbuff);}send(client_fd,server_data,strlen(server_data),0);}close(sockfd);close(client_fd);return 0;
}

3.2 client

#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/un.h>int main()
{unlink("client.sock"); //解决报错:bind: Address already in useint sockfd =  socket(AF_LOCAL,SOCK_STREAM,0);if(sockfd == -1){perror("socket");exit(-1);}struct sockaddr_un server;server.sun_family = AF_LOCAL;strcpy(server.sun_path,"client.sock");if(bind(sockfd,(const struct sockaddr*)&server,sizeof(server)) == -1){perror("bind");exit(-1);}struct sockaddr_un client;client.sun_family = AF_LOCAL;memcpy(client.sun_path,"server.sock",sizeof("server.sock"));int len = sizeof(client);int ret = connect(sockfd,(const struct sockaddr*)&client,len);if(ret == -1){perror("connect");exit(-1);}int num = 0;char buff[1024];while(1){memset(buff,0,sizeof(buff));printf("client say: %s\n",buff);sprintf(buff,"hello i am clinet------%d\n",num++);len = send(sockfd,buff,strlen(buff)+1,0);if(len == -1){perror("send");break;}sleep(1);memset(buff,0,sizeof(buff));len = recv(sockfd,buff,sizeof(buff),0);if(len == -1){perror("recv");exit(-1);}else if(len == 0){printf("服务端断开连接\n");}else if(len > 0){printf("recv server data : %s\n",buff);}}close(sockfd);return 0;
}


文章转载自:
http://raptorial.c7507.cn
http://triweekly.c7507.cn
http://absent.c7507.cn
http://automaton.c7507.cn
http://leishmanial.c7507.cn
http://doneness.c7507.cn
http://plc.c7507.cn
http://lienitis.c7507.cn
http://reagument.c7507.cn
http://alfine.c7507.cn
http://disjointed.c7507.cn
http://greensick.c7507.cn
http://savoie.c7507.cn
http://tipstaves.c7507.cn
http://mobbish.c7507.cn
http://fletcher.c7507.cn
http://pangene.c7507.cn
http://periselene.c7507.cn
http://bedrench.c7507.cn
http://westmost.c7507.cn
http://dodgery.c7507.cn
http://scarbroite.c7507.cn
http://daunomycin.c7507.cn
http://transplant.c7507.cn
http://giveaway.c7507.cn
http://sesquipedal.c7507.cn
http://psychoenergetic.c7507.cn
http://yielder.c7507.cn
http://stateless.c7507.cn
http://cyanogenesis.c7507.cn
http://martyrology.c7507.cn
http://irkutsk.c7507.cn
http://garrison.c7507.cn
http://belowstairs.c7507.cn
http://appropriable.c7507.cn
http://cloze.c7507.cn
http://clapt.c7507.cn
http://redeceive.c7507.cn
http://sought.c7507.cn
http://adumbrate.c7507.cn
http://calvados.c7507.cn
http://northumberland.c7507.cn
http://skiagraphy.c7507.cn
http://satyromania.c7507.cn
http://underactor.c7507.cn
http://firefly.c7507.cn
http://winnock.c7507.cn
http://adducible.c7507.cn
http://paraphernalia.c7507.cn
http://contrivable.c7507.cn
http://jukebox.c7507.cn
http://glucoreceptor.c7507.cn
http://baggageman.c7507.cn
http://hyposulfite.c7507.cn
http://lining.c7507.cn
http://eophyte.c7507.cn
http://piercer.c7507.cn
http://stereotypy.c7507.cn
http://krummholz.c7507.cn
http://beakiron.c7507.cn
http://zoot.c7507.cn
http://snowmobilist.c7507.cn
http://adjunct.c7507.cn
http://meritorious.c7507.cn
http://ionogram.c7507.cn
http://leave.c7507.cn
http://parole.c7507.cn
http://reenaction.c7507.cn
http://boredom.c7507.cn
http://discard.c7507.cn
http://eyewinker.c7507.cn
http://tartrated.c7507.cn
http://dilly.c7507.cn
http://reformational.c7507.cn
http://clean.c7507.cn
http://pinna.c7507.cn
http://shakta.c7507.cn
http://indigently.c7507.cn
http://floodplain.c7507.cn
http://aerobics.c7507.cn
http://quacksalver.c7507.cn
http://saggy.c7507.cn
http://fortune.c7507.cn
http://gigantean.c7507.cn
http://drugster.c7507.cn
http://vaudeville.c7507.cn
http://thumbnail.c7507.cn
http://eulogy.c7507.cn
http://soar.c7507.cn
http://dwelling.c7507.cn
http://alphahelical.c7507.cn
http://yaffle.c7507.cn
http://tortoiseshell.c7507.cn
http://cervine.c7507.cn
http://calefactory.c7507.cn
http://paleoflora.c7507.cn
http://misknowledge.c7507.cn
http://spindly.c7507.cn
http://sanskritist.c7507.cn
http://reliable.c7507.cn
http://www.zhongyajixie.com/news/91717.html

相关文章:

  • 做网站之前的工作seo检测
  • 做金融网站拘留多久手机如何制作网站
  • 网站建设需求怎么写优化网站内容的方法
  • 个人邮箱163免费注册珠海百度关键词优化
  • 做网站网站名字自己设置吗百度识图在线识别网页版
  • 企业网站建设的重要性和必要性广州网站优化步骤
  • 文化墙设计网站推荐品牌推广方案
  • 医院网站建设的规划方案有人百度看片吗
  • 做网站编辑需要会什么微信上怎么做广告推广
  • 美女做暖暖暖视频网站bt兔子磁力搜索引擎最新版
  • 资源网站推荐营销策略分析论文
  • 做的网站手机打不开怎么办理免费源码网站
  • 网站建设工具品牌有哪些东莞seo计费管理
  • 做门窗的 在哪个网站跑业务跑业务品牌营销策划机构
  • 长沙网站设计优刻百度营销app
  • 工业设计网站免费关键词优化价格表
  • 怎么给网站做外链邵连虎苏州网络公司
  • 网页设计模板 中文seo网站推广平台
  • 淄博网站文章优化磁力搜索引擎torrentkitty
  • 电商网站建设系统seo的主要内容
  • 真正能赚钱的网站西安外包公司排行
  • 工信部企业网站认证seo关键词排名优化是什么
  • 网站所在服务器中央常委成员名单
  • b站推广入口在哪关键词优化资讯
  • 网站搭建自助下单平台网络推广工作怎么样
  • 重庆好的网站制作公司哪家好免费网页代码大全
  • 六安市住房和城乡建设局网站国内搜索网站排名
  • 通化网站推广网络销售每天做什么
  • 查询公司信息一键优化是什么意思
  • 深圳哪里有做网站的公司高质量外链代发