Skip to content

๐Ÿฅ… ๋ฐฑ์—”๋“œ ์‹œ๊ทธ๋„๋ง ์„œ๋ฒ„ ๋ฌธ์„œ

Junsang Yu edited this page Nov 12, 2024 · 1 revision

Socket IO ๋ช…์„ธ

๊ทผ๋ฐ ์†Œ์ผ“์— request, response๊ฐ€ ์žˆ๋‚˜์š”? ๊ทธ๋ƒฅ payload๋งŒ ์žˆ๋Š”๊ฑฐ ์•„๋‹Œ๊ฐ€์š”?

request๋ฅผ ์„œ๋ฒ„์ชฝ payload, response๋ฅผ ํด๋ผ์ด์–ธํŠธ์ชฝ payload๋กœ ์ƒ๊ฐํ•˜๋ฉด ๋˜๋‚˜์š”

  • payload๋ฅผ request, response๋กœ ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹คโ€ฆ!
  • ํ†ต์ƒ์ ์œผ๋กœ request, response์˜ ์˜๋ฏธ๋Š” ๊ทธ๊ฒŒ ๋งž์ง€๋งŒ, ์ €ํฌ ํ”„๋กœ์ ํŠธ์—์„œ๋Š” socket.on() ์ด ์žˆ๋Š” ์ชฝ์—์„œ ์ƒ๊ฐํ–ˆ์Šต๋‹ˆ๋‹ค.

ํ•œ๋ฒˆ์— ๋ฌถ์–ด์„œ ๋ณด๋‹ˆ๊นŒ ์ƒ๊ฐ๋ณด๋‹ค ๋„ค์ด๋ฐ์ด ํ—ท๊ฐˆ๋ฆฌ๊ธด ํ•˜๋„ค์š”

์•„ ์ด๊ฒŒ connection์ด๋ผ๋Š” ์ด๋ฒคํŠธ

  • ์ดˆ๊ธฐ์— ์ผ์–ด๋‚˜๋Š” ์ด๋ฒคํŠธ โ†’ socket.on์œผ๋กœ ๋ฐ›๋Š” ์ด๋ฒคํŠธ๊ฐ€ ์•„๋‹ˆ๋ผ์„œ <>๋กœ ํ‘œ๊ธฐ

๐Ÿš€ ํ”„๋กœ์ ํŠธ ๊ทœ์น™

๐Ÿš€ ํ”„๋กœ์ ํŠธ ๊ธฐํš

๐Ÿ“ฝ ๋ฐ์ผ๋ฆฌ ์Šคํฌ๋Ÿผ

๐Ÿ‘ฅ ๊ทธ๋ฃน ํšŒ๊ณ 

๐Ÿ““ ๋ฉ˜ํ† ๋ง ์ผ์ง€

๐Ÿ“† ํšŒ์˜๋ก

๐Ÿง ๊ฐœ๋ฐœ์ผ์ง€

Clone this wiki locally