Skip to content

Instantly share code, notes, and snippets.

@ry
Last active February 25, 2019 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ry/4bcc56950b6fe2239c8d56fca5f23e38 to your computer and use it in GitHub Desktop.
Save ry/4bcc56950b6fe2239c8d56fca5f23e38 to your computer and use it in GitHub Desktop.

node

socket(AF_INET6, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, IPPROTO_IP) = 12
setsockopt(12, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(12, SOL_IPV6, IPV6_V6ONLY, [0], 4) = 0
bind(12, {sa_family=AF_INET6, sin6_port=htons(4544), inet_pton(AF_INET6, "::", &sin6_addr), sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
listen(12, 511)                         = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN, {u32=6, u64=6}}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 8, {EPOLLIN, {u32=8, u64=8}}) = 0
epoll_ctl(3, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=12}}) = 0
epoll_wait(3, [{EPOLLIN, {u32=12, u64=12}}], 1024, -1) = 1
accept4(12, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = 13
accept4(12, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(3, EPOLL_CTL_ADD, 13, {EPOLLIN, {u32=13, u64=13}}) = 0
epoll_wait(3, [{EPOLLIN, {u32=13, u64=13}}], 1024, -1) = 1
read(13, "GET / HTTP/1.1\r\nHost: 127.0.0.1:"..., 65536) = 78
write(13, "HTTP/1.1 200 OK\r\nContent-Length:"..., 51) = 51
epoll_ctl(3, EPOLL_CTL_MOD, 13, {EPOLLIN, {u32=13, u64=13}}) = 0
epoll_wait(3, [{EPOLLIN, {u32=13, u64=13}}], 1024, -1) = 1
read(13, "", 65536)                     = 0
epoll_ctl(3, EPOLL_CTL_DEL, 13, 0x7ffef4d1d020) = 0
close(13)                               = 0
epoll_wait(3, 0x7ffef4d1df10, 1024, -1) = -1 EINTR (Interrupted system call)

deno_core

socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, IPPROTO_IP) = 6
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(6, {sa_family=AF_INET, sin_port=htons(8080), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
listen(6, 1024)                         = 0
fcntl(6, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(6, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
getrandom("\x65\x0c\x75\x91\x55\xee\xeb\xa2\x86\x61\xcd\xe6\x51\xda\x09\x72", 16, GRND_NONBLOCK) = 16
write(1, "listening 3\n", 12)           = 12
epoll_wait(3, [], 1024, 0)              = 0
epoll_ctl(3, EPOLL_CTL_ADD, 6, {EPOLLIN|EPOLLPRI|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=0, u64=0}}) = 0
epoll_wait(3, [], 1024, 0)              = 0
epoll_wait(3, [{EPOLLIN, {u32=0, u64=0}}], 1024, -1) = 1
accept4(6, {sa_family=AF_INET, sin_port=htons(46568), sin_addr=inet_addr("127.0.0.1")}, [128->16], SOCK_CLOEXEC) = 7
ioctl(7, FIONBIO, [1])                  = 0
epoll_wait(3, [], 1024, 0)              = 0
epoll_wait(3, [], 1024, 0)              = 0
epoll_ctl(3, EPOLL_CTL_ADD, 7, {EPOLLIN|EPOLLPRI|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=4194305, u64=4194305}}) = 0
accept4(6, 0x7fff37ae4100, [128], SOCK_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(3, [{EPOLLIN|EPOLLOUT, {u32=4194305, u64=4194305}}], 1024, 0) = 1
recvfrom(7, "GET / HTTP/1.1\r\nHost: 127.0.0.1:"..., 65536, 0, NULL, NULL) = 78
epoll_wait(3, [], 1024, 0)              = 0
epoll_wait(3, [], 1024, 0)              = 0
sendto(7, "HTTP/1.1 200 OK\r\nContent-Length:"..., 51, MSG_NOSIGNAL, NULL, 0) = 51
epoll_wait(3, [], 1024, 0)              = 0
epoll_wait(3, [], 1024, 0)              = 0
recvfrom(7, "", 65536, 0, NULL, NULL)   = 0
epoll_wait(3, [{EPOLLIN|EPOLLOUT|EPOLLRDHUP, {u32=4194305, u64=4194305}}], 1024, 0) = 1
epoll_ctl(3, EPOLL_CTL_DEL, 7, 0x7fff37ae3548) = 0
close(7)                                = 0
epoll_wait(3, [], 1024, 0)              = 0
epoll_wait(3, 0x7f47edf55000, 1024, -1) = -1 EINTR (Interrupted system call)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment