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.