Updated ...md (markdown)

manojampalam 2016-02-24 13:58:03 -08:00
parent 0de5450516
commit 1da3573827

@ -27,6 +27,7 @@ This layer of protocol implementation in OpenSSH consists of mainly IO, parsing
Brief design details of POSIX wrapper
+ Single threaded (not thread safe based on current needs but can be made so if needed going forward).
+ Maintains file descriptor table and its state. Table stores mapping between file descriptors (int) and associated Windows IO state (handle, buffers, async call state, etc).
+ fd_set implemented as a bit array, lowest available file descriptors get allocated first.
+ Calls underlying Win32 APIs that provide [Overlapped](https://en.wikipedia.org/wiki/Overlapped_I/O) semantics.
+ "select" and blocking IO calls go through a common "wait_for_any" function that wakes up on
- IO completions
@ -44,8 +45,15 @@ Brief design details of POSIX wrapper
| send | WSASend | |
| recv | WSARecv | |
| open | CreateFile | |
| creat | CreateFile | |
| pipe | CreateNamedPipe | A uni directional named pipe with and internal name is created, CreateFile called to connect from other end |
| read | ReadFileEx | |
| write | WriteFileEx | |
| fdopen | TBD | |
| fstat | TBD | |
| dup, dup2 | SetStdHandle | only supported on standard IO file descriptors |
| socketpair | CreateNamedPipe | A bi directional named pipe with an internal name is created, CreateFile called to connect from other end. This does not support AF_UNIX ancilliary messages. More details later |