Nonblocking%20I/O - PowerPoint PPT Presentation

About This Presentation
Title:

Nonblocking%20I/O

Description:

Nonblocking I/O. Nonblocking reads and writes. Buffers enabling overlapped nonblocking I/O ... Overlap processing with connection establishment. Check for ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 5
Provided by: Reb1
Category:

less

Transcript and Presenter's Notes

Title: Nonblocking%20I/O


1
Nonblocking I/O
  • Nonblocking reads and writes
  • Buffers enabling overlapped nonblocking I/O
  • Nonblocking connect

2
Nonblocking Reads and Writesoverlapping I/O in
str_cli of echo client
  • Set descriptors nonblocking using fcntl
  • initialize buffer pointers of to and fr
    buffers
  • main loop to call select
  • specify interested descriptors
  • call select
  • read from standard input
  • handle nonblocking error
  • read returns end-of-file
  • read returns data
  • read from socket
  • write OK
  • write to socket

3
Buffers Enabling Overlapped Nonblocking I/O in
str_cli
4
Nonblocking connect Daytime Client
  • Set socket nonblocking by fcntl
  • Overlap processing with connection establishment
  • Check for immediate completion
  • Call select
  • Handle timeouts
  • Check for readability or writability
  • Turn off nonblocking an return
Write a Comment
User Comments (0)
About PowerShow.com