Skip to content

Commit d0df709

Browse files
committed
更新 anet.c 的注释
1 parent 2ef409a commit d0df709

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/anet.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ int anetResolveIP(char *err, char *host, char *ipbuf, size_t ipbuf_len) {
229229
return anetGenericResolve(err,host,ipbuf,ipbuf_len,ANET_IP_ONLY);
230230
}
231231

232+
// 设置地址为可重用
232233
static int anetSetReuseAddr(char *err, int fd) {
233234
int yes = 1;
234235
/* Make sure connection-intensive things like the redis benckmark
@@ -259,6 +260,7 @@ static int anetCreateSocket(char *err, int domain) {
259260
return s;
260261
}
261262

263+
// 通用连接创建函数,被其他高层函数所调用
262264
#define ANET_CONNECT_NONE 0
263265
#define ANET_CONNECT_NONBLOCK 1
264266
static int anetTcpGenericConnect(char *err, char *addr, int port,

0 commit comments

Comments
 (0)