- 博客(9)
- 收藏
- 关注
原创 Linux环境下的基于C++的一对多 Socket 通信
server: #include<stdio.h> #include<stdlib.h> #include<string.h> #include<sys/socket.h> #include<netinet/in.h> #include<arpa/inet.h> #include<unistd.h> #include<signal.h> int sockfd; void fa(int signo) {
2020-09-07 20:55:40
502
原创 Linux环境下的基于C++的一对一 Socket 通信
Socket 编程( Linux 环境下) 使用 <sys/socket.h> 头文件中 socket() 函数来创建套接字 int socket(int af, int type, int protocol); // 函数原型 1)af 表示地址族(Address Family),也就是 IP 地址类型,常用的有 AF_INET(IPv4) 和 AF_INET6(IPv6),也可以使用 PF_INET 和 PF_INET6,PF 表示 Protocol Family,两者等价。 2)t
2020-09-05 20:46:21
179
原创 Linux 下的socket通信例子 C++
server.cpp #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <arpa/inet.h> #include <sys/socket.h> #include <netinet/in.h> int main(){ //创建套接字 int serv_sock = socket(A
2020-09-04 20:53:30
133
原创 python socket模块
服务器端:server.py import socket # 调用模块 sk = socket.socket() # 创建socket addess = ('127.0.0.1', 8000) sk.bind(addess) # 为socket绑定IP地址与端口号 sk.listen(3) # 客户端连接人数 conn, add = sk.accept() # 等待客户端连接 data = conn.recv(1024) # 接收的信息 p
2020-09-03 15:59:30
118
原创 华硕 BIOS 硬件虚拟化开启
进入华硕 BIOS 按 DEL 键进入 按 F7 进入高级模式 选择 高级 选择 CPU 设置 选择 硬件虚拟化 开启 按下 F10保存
2020-09-02 13:09:02
1578
原创 2020-09-01
Ubuntu Python软连接 /usr/bin/python3: 解释器错误: 没有那个文件或目录 # 解决该问题 sudo rm -rf /usr/bin/python3 # 删除原来的软连接 sudo ln -s /home/wxy/anaconda/bin/python /usr/bin/python3 # 新建链接文件指向python的安装路径 ...
2020-09-01 17:52:12
69
原创 2020-09-01
Ubuntu 和 Windows 共享文件夹设置 # Ubuntu_share 为 Windows 共享文件夹名,/mnt/shared/ 为 Ubuntu 共享文件夹位置 sudo mount -t vboxsf Ubuntu_share /mnt/shared/
2020-09-01 17:50:53
84
原创 基于 Ubuntu 系统的 Redis Cluster 环境配置
基于 Ubuntu 系统的 Redis Cluster 环境配置 系统所用软件的基本信息 Windows系统下 Oracle VM VirtualBox 6.1.12 ubuntu-20.04.1-desktop-amd64 Pycharm 20.2 x64 Anaconda3-2020.07-Windows-x86_64 Ubuntu系统下 mysql 8.0.21 redis 4.0.2 ruby 2.7.0 Anaconda 配置 安装完成后,在环境变量Path中加入 D:\Python\An
2020-08-21 20:28:10
227
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人