0

I have just started network programming and I am a bit confused Does the read and write operations behavior {in regards to blocking or not} change depending if we have a regular file descritpor or a socket descriptor (UDP socket or TCP socket).

1
  • Unfortunately, questions about programming are off-topic here. Fortunately, there are many network-savvy programmers on Stack Overflow, where you should try to ask this question.
    – Ron Maupin
    Apr 21, 2016 at 17:24

1 Answer 1

1

Blocking I/O * here the calling system does not return control to the caller until the operation finished. *as for a result, the caller is blocked and cannot perform other activities during that specified time.

Non-blocking Synchronous I/O

*here call returns control to the caller immediately and the caller not made to wait. * The invoked system immediately returns one of two responses: . If the call was executed and the results were ready, then the caller is told of that. Alternatively, the invoked system can tell the caller that the system has no resources (no data in the socket) to perform the requested action.

  • Non-blocking Asynchronous I/O *means that the calling function returns control to the caller immediately, reporting that the requested action was started. *here invoked system will notify the caller (by callback for example), when the result is ready for processing.

Not the answer you're looking for? Browse other questions tagged or ask your own question.