Post

IO ๐Ÿ†š NIO

๐Ÿ†š Difference:

  • ๊ณตํ†ต์ : used to perform read and write operations
  • ์ฐจ์ด์ : How to use it in network programming

โœ… IO

Input, Output

  • 1๏ธโƒฃ blocking
  • process waits until data operation finishes

  • 2๏ธโƒฃ input, output with: stream
  • use stream for transferring data
  • unidirectional data transfer

Screenshot 2024-09-07 at 23 52 29

  • 3๏ธโƒฃ buffer: Non-buffer โŒ
  • 4๏ธโƒฃ asynchronous: support โŒ

โœ… NIO

New Input, Output

  • 1๏ธโƒฃ non blocking
  • process doesnt wait, can do other work

  • 2๏ธโƒฃinput, output with: channel
  • channel: medium for efficient data transmisison between entity and buffer
  • data is read into buffer, processed using a channel
  • bidirectional

Screenshot 2024-09-07 at 23 52 45

  • 3๏ธโƒฃ buffer: Buffer โญ•๏ธ
  • 4๏ธโƒฃ asynchronous: support โญ•๏ธ
This post is licensed under CC BY 4.0 by the author.