Skip to Content
HTTP 완벽 가이드
book

HTTP 완벽 가이드

by David Gourlry, Brian Totty, Lee Eung Jun, Sang -Il Jeong, Anshu Agarwal, Seilu Reddy, Marjorie Sayre
May 2022
Beginner to intermediate
756 pages
21h 30m
Korean
Insight
Content preview from HTTP 완벽 가이드
90
1
부 HTTP: 웹의 기초
HTTP
4.1.4
TCP
소켓 프로그래밍
운영체제는 TCP 커넥션의 생성과 관련된 여러 기능을 제공한다. 어떤 기능들이 있
는지 TCP 프로그래밍 인터페이스를 간단히 살펴보자. 표 4-2는 소켓 API의 주요
인터페이스를 보여준다. 이 소켓 API는 HTTP 프로그래머에게 TCP와 IP의 세부사
항들을 숨긴다. 소켓 API는 유닉스 운영체제용으로 먼저 개발되었지만, 지금은 소
켓 API의 다양한 구현체들 덕분에 대부분의 운영체제와 프로그램 언어에서 이를
사용할 수 있게 되었다.
소켓
API
호출 설명
s
=
socket
(<
parameters
>) 연결이되지않은익명의새로운소켓생성
bind
(
s
,<
local
IP
:
port
>) 소켓에로컬포트번호와인터페이스할당
connect
(
s
,<
remote
IP
:
port
>) 로컬의소켓과원격의호스트및포트사이에
TCP
커넥션생성
listen
(
s
,...) 커넥션을받아들이기위해로컬소켓에허용함을표시
s2
=
accept
(
s
) 누군가로컬포트에커넥션을맺기를기다림
n
=
read
(
s
,
buffer
,
n
) 소켓으로부터버퍼에
n
바이트읽기시도
n
=
write
(
s
,
buffer
,
n
) 소켓으로부터버퍼에
n
바이트쓰기시도
close
(
s
)
TCP
커넥션을완전히끊음
shutdown ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지

몽고DB 완벽 가이드(3판): 실전 예제로 배우는 NoSQL 데이터베이스 기초부터 활용까지

김인범, 크리스티나 초도로우, 섀넌 브래드쇼, 오언 브라질

Publisher Resources

ISBN: 9788966261208