Choosing I/O

When to use standard I/O

  • When working with disk or terminal files When to use raw I/O
  • Inside signal handlers, because Unix I/O is async-signal-safe
  • In rare cases when you need absolute highest performance When to use RIO
  • When you are dealing and writing network sockets
  • Avoid using standard I/O on sockets