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
- 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
- 3๏ธโฃ buffer: Buffer โญ๏ธ
- 4๏ธโฃ asynchronous: support โญ๏ธ
This post is licensed under CC BY 4.0 by the author.