Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 697 Bytes

File metadata and controls

13 lines (11 loc) · 697 Bytes

Overview

P\Invoke example which implements a managed adapter to TCP Ws2 sockets. It exposes a part of the available API, but it is enough to create an asynchronous client or server which supports only TCP.

Uses the following WinAPI components:

  • IOCP (I/O Completion Ports) for asynchronous I/O operations.
  • OS-managed thread pool which listens on IOCP and dispatches the completion callbacks.
  • WS2 sockets for network communication.

Callback-based asynchronous model is adapted to the Task-based asynchronous model which is used in C#. Additionally, implements a scoping mechanism for deterministic resource management. For more information, look into comments littered across the codebase.