前言
将 class 转为构造函数看似很简单,但作为封装者,有很多注意事项
class Person {constructor(name) {this.name name;}fn() { console.log(this.name); }
}实现
初步转化如下:
function Person() {this.name name
}
Person.prototy…
使用C实现一个支持基本消息传递的TCP客户端和服务器
在网络编程中,TCP(Transmission Control Protocol)是一种常用的协议,用于在计算机之间建立可靠的连接。通过实现一个TCP客户端和服务器,可以深入理解TCP协议的工作…