오늘 배울 것

TCP 커넥션

웹브라우저가 TCP 커넥션을 통해서 웹 서버에 요청을 보냄.

웹브라우저가 TCP 커넥션을 통해서 웹 서버에 요청을 보냄.

Sockets API call Description
s = socket(<parameters>) Creates a new, unnamed, unattached socket.
bind(s, <local IP:port>) Assigns a local port number and interface to the socket.
connect(s, <remote IP:port>) Establishes a TCP connection to a local socket and a remote host and port.
listen(s,...) Marks a local socket as legal to accept connections.
s2 = accept(s) Waits for someone to establish a connection to a local port.
n = read(s,buffer,n) Tries to read n bytes from the socket into the buffer.
n = write(s,buffer,n) Tries to write n bytes from the buffer into the socket.
close(s) Completely closes the TCP connection.
shutdown(s,<side>) Closes just the input or the output of the TCP connection.
getsockopt(s, . . . ) Reads the value of an internal socket configuration option.
setsockopt(s, . . . ) Changes the value of an internal socket configuration option.

클이언트와 서버가 TCP 소켓 인터페이스를 사용하여 상호작용하는 방법

클이언트와 서버가 TCP 소켓 인터페이스를 사용하여 상호작용하는 방법

TCP 성능에 대하여

<aside> 👀 고성능의 HTTP 소프트웨어를 개발하고 있는 게 아니라면 완벽히 이해할 필요는 없음.

</aside>