Jun

Results 164 comments of Jun

> @lvhuiyang 膜拜大佬,先mark。 被发现了QAQ,时隔一年才更新=。=

@yetingsky 以前会用ipdb单步读源码,现在不这样了,主要还是单步容易被打断,影响阅读效率,而且对于fork操作也不好调试,所以现在都是直接用vim读源码片段,vim的ycm跳转代码块很方便的。 另外,美团云控制台的wsgi server是gunicorn + gevent

@yetingsky 豆瓣的菊苣别闹QWQ 对象的type其实可以靠上下文猜测,毕竟是动态语言。

也是菊苣 qaq 2017年5月6日(土) 10:35 Ting Ye : > @Junnplus 已经不在豆瓣了 orz =。= > > — > You are receiving this because you were mentioned. > Reply to this email directly,...

# 0x02 socket 结构 通用的 BSD socket 结构体定义: ```c // include/linux/net.h /** * struct socket - general BSD socket * @state: socket state (%SS_CONNECTED, etc) * @type: socket type (%SOCK_STREAM,...

# 0x03 协议族 socket 支持的多种协议族: ```c // include/linux/socket.h /* Supported address families. */ #define AF_UNSPEC 0 #define AF_UNIX 1 /* Unix domain sockets */ #define AF_LOCAL 1 /* POSIX name...

list_head 双向链表 ```c // tools/include/linux/types.h struct list_head { struct list_head *next, *prev; }; // tools/include/linux/list.h #define LIST_HEAD_INIT(name) { &(name), &(name) } #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name) static...

# sockfd_lookup_light ```c // net/socket.c static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) { struct fd f = fdget(fd); struct socket *sock; *err = -EBADF; if (f.file) { sock...

# inet_bind ```c // net/ipv4/af_inet.c int inet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) { struct sock *sk = sock->sk; int err; /* If the socket has its own bind...