๐ต socket: process๊ฐ network ์ธ๊ณ๋ก data๋ฅผ ๋ด๋ณด๋ด๊ฑฐ๋ ๋ฐ๊ธฐ ์ํ ์ค์ ์ ์ธ ์ฐฝ๊ตฌ
- [protocol + ip + port]๋ก ์ ์
- protocol: system์ด ๋ค๋ฅธ system๊ณผ ํต์ ์ ์ํ ํ๊ฒ ์์ฉํ๋๋ก ํด์ฃผ๋ ํต์ ๊ท์ฝ
- ip: ์ ์ธ๊ณ ์ปดํจํฐ์ ๋ถ์ฌ๋ ๊ณ ์ ์ ์๋ณ ์ฃผ์
- port: network์์์ ํต์ ํ๊ธฐ ์ํด host ๋ด๋ถ์ ์ผ๋ก process๊ฐ ํ ๋น๋ฐ์์ผ ํ๋ ๊ณ ์ ํ ์ซ์ => ๊ฐ์ ์ปดํจํฐ ๋ด์์ program์ ์๋ณํ๋ ๋ฒํธ
๐ต HTTP vs SOCKET
[HTTP ํต์ ์ ํน์ง]
- client๊ฐ ์์ฒญ์ ๋ณด๋ด๋ ๊ฒฝ์ฐ์๋ง server๊ฐ ์๋ตํ๋ ๋จ๋ฐฉํฅ ํต์
- server๋ก๋ถํฐ ์๋ต์ ๋ฐ์ ํ์๋ ์ฐ๊ฒฐ์ด ๋ฐ๋ก ์ข ๋ฃ
- ์ค์๊ฐ x, ํ์ํ ๊ฒฝ์ฐ์๋ง server๋ก ์์ฒญ์ ๋ณด๋
- application(android/ios) ๊ฐ๋ฐ์ ์ฃผ๋ก ์ฌ์ฉ
[SOCKET ํต์ ์ ํน์ง]
- server์ client๊ฐ ๊ณ์ ์ฐ๊ฒฐ์ ์ ์งํ๋ ์๋ฐฉํฅ ํต์
- server์ client๊ฐ ์ค์๊ฐ์ผ๋ก data๋ฅผ ์ฃผ๊ณ ๋ฐ๋ ์ํฉ์ด ํ์ํ ๊ฒฝ์ฐ ์ฌ์ฉ
- ์ค์๊ฐ ๋์์ streaming/online game๊ณผ ๊ฐ์ ๊ฒฝ์ฐ ์์ฃผ ์ฌ์ฉ
===========================================================
๐ต client-server socket ํต์ ํ๋ฆ
์ฐธ์กฐ(reference): https://helloworld-88.tistory.com/215
[๊ธฐ๋ณธ] ์์ผ(SOCKET)ํต์ ์ด๋?
์์ผํต์ ์์ผ(SOCKET)์ด๋? ์์ผ(Socket)์ ํ๋ก์ธ์ค๊ฐ ๋๋์ ๋คํธ์ํฌ ์ธ๊ณ๋ก ๋ฐ์ดํฐ๋ฅผ ๋ด๋ณด๋ด๊ฑฐ๋ ํน์ ๊ทธ ์ธ๊ณ๋ก๋ถํฐ ๋ฐ์ดํฐ๋ฅผ ๋ฐ๊ธฐ ์ํ ์ค์ ์ ์ธ ์ฐฝ๊ตฌ ์ญํ ์ ํ๋ค. ๊ทธ๋ฌ๋ฏ๋ก ํ๋ก์ธ์ค๊ฐ ๋ฐ
helloworld-88.tistory.com
'Network' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ํ๋กํ ์ฝ(protocol) (0) | 2021.09.01 |
---|---|
basics of computer networks (0) | 2021.05.26 |
network protocol (0) | 2021.04.30 |
data units in computer systems (0) | 2021.04.28 |
session & cookie (0) | 2021.04.08 |
๋๊ธ