一、服务器和客户端(单对单)1、TCP服务器创建流程1)socket(创建服务器套接字)#include <sys/types.h> /* See NOTES */
#include <sys/socket.h>
int socket(int domain, int type, int protocol…
定义参数类型
Record<Keys, Type>
// 定义一个对象类型,键是 name 和 age,值是 string 和 number
type Person Record<name | age, string | number>;const person: Person {name: John Doe,age: 30
};console.log(person.name); // 输出:…