readme
来自「ace开发环境 用来开发网络程序 其运用了设计模式、多平台、C++等多种知识」· 代码 · 共 37 行
TXT
37 行
Presently, this directory contains only one example application forSPIPEs. The test source code is contained in SPIPE-acceptor.h andSPIPE-connector.h.The SPIPE-acceptor example illustrates how named pipes are used on NT.Once the server establishes a connection to a single client, it spawnsa thread pool to handle incoming requests via the proactor event loop.That is, a separate thread from the pool is used to process eachmessage sent by a client. The size of the thread pool can bespecified by command-line arguments. This example leverages thequeueing performed by the NT kernel to trivially implement a threadpool architecture.test_spipe_acceptor has the following command-line arguments:test_spipe_acceptor -t <threads><threads> specifies the size of the thread-pool running in theproactor event loop.Here's how to run the tests:% test_spipe_acceptor -t 1000000starting up daemon test_sock_acceptorOpening acepipehello% test_spipe_connectorstarting up daemon test_sock_connectorOpening acepipeactivating 5 please enter input..: helloThere are a number of other options that you can provide. Please seethe source code for details.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?