亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲(chóng)蟲(chóng)首頁(yè)| 資源下載| 資源專(zhuān)輯| 精品軟件
登錄| 注冊(cè)

您現(xiàn)在的位置是:蟲(chóng)蟲(chóng)下載站 > 資源下載 > *行業(yè)應(yīng)用 > client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> i

client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> i

  • 資源大小:2 K
  • 上傳時(shí)間: 2017-07-29
  • 上傳用戶(hù):__catcher
  • 資源積分:2 下載積分
  • 標(biāo)      簽: include socket sys gt

資 源 簡(jiǎn) 介

client socket include <sys/types.h> include <sys/socket.h> include <stdio.h> include <netinet/in.h> include <arpa/inet.h> include <unistd.h> int main() { int sockfd int len struct sockaddr_in address int result char ch = A sockfd = socket(AF_INET, SOCK_STREAM, 0) address.sin_family = AF_INET address.sin_addr.s_addr = inet_addr("127.0.0.1") address.sin_port = 9734 len = sizeof(address) result = connect(sockfd, (struct sockaddr *)&address, len) if(result == -1) { perror("oops: client") exit(1) } write(sockfd, &ch, 1) read(sockfd, &ch, 1) printf("char from server = c\n", ch) close(sockfd) exit(0) }

相 關(guān) 資 源

主站蜘蛛池模板: 乌兰浩特市| 常熟市| 阳信县| 武清区| 元朗区| 光山县| 深州市| 专栏| 海南省| 龙江县| 布拖县| 阿拉尔市| 鱼台县| 浙江省| 定兴县| 梨树县| 江达县| 华坪县| 泸定县| 乌海市| 镇原县| 丰县| 宁乡县| 博野县| 鄂托克前旗| 镇沅| 葫芦岛市| 阜新市| 新密市| 五指山市| 凤冈县| 叶城县| 务川| 平潭县| 遂川县| 濉溪县| 高尔夫| 澳门| 龙山县| 天镇县| 德钦县|