deploying the networking TSreturn make_error_code(err); } buffer.grow(n); return {}; } ## What's the Completion Signature? void(std::error_code, std::size_t, message_type, typename DynamicBufferV2::const_buffers_type); read from the network ## Writing DataConn using async_write_state = std::array; // Completion signature: decltype(auto) async_write(AsyncWriteStream& stream, message_type type, async_write_state& bytes_transferred; std::size_t messages; std::size_t waits; async_heartbeat_reason reason; }; // Completion signature: // void(std::error_code, async_heartbeat_statistics); template 0 码力 | 44 页 | 892.77 KB | 1 年前3
Guzzle PHP v5 Documentation35 1.5.2 Middleware 36 1.5.3 HandlerStack 38 1.5.4 Creating a Handler 39 1.6 Testing Guzzle Clients 40 1.6.1 Mock Handler 40 1.6.2 History Middleware 40 1.6.3 Test Web Server 41 1.7 FAQ Requirements 1. PHP 5.5.0 2. To use the PHP stream handler, allow_url_fopen must be enabled in your system's php.ini. 3. To use the cURL handler, you must have a recent version of cURL $ \geq $ wrapper to send HTTP requests if cURL is not installed. Alternatively, you can provide your own HTTP handler used to send requests. ## I nstallation The recommended way to install Guzzle is with Composer0 码力 | 49 页 | 231.08 KB | 1 年前3
Guzzle PHP 5.3 DocumentationRequirements 1. PHP 5.4.0 2. To use the PHP stream handler, allow_url_fopen must be enabled in your system's php.ini. 3. To use the cURL handler, you must have a recent version of cURL $ \geq $ wrapper to send HTTP requests if cURL is not installed. Alternatively, you can provide your own HTTP handler used to send requests. #### 1.1.2 Installation The recommended way to install Guzzle is with Composer Clients Clients are used to create requests, create transactions, send requests through an HTTP handler, and return a response. You can add default request options to a client that are applied to every0 码力 | 63 页 | 275.75 KB | 1 年前3
THE NETWORKINGTS FROM SCRATCH: IO Objects“standalone” Asia & Boost.Asio (P0958) INITIATOR TIMER EXECUTOR INTERMEDIATE COMPLETION HANDLER SOCKET COMPLETION HANDLER async_wait() operator()()  operator()()  @robot.handler def hello(message): return 'Hello World!' # 让服务器监听在 0.0.0.0:80 robot.config['HOST'] ,WeRoBot 会将消息转交给 Handler 进行处理,并将 Handler 的返回值返回给微信服务器。 在刚才的 Hello World 中,我们编写的 @robot.handler def hello(message): return 'Hello World!' 就是一个简单的 Handler,@robot.handler 意味着 robot 会将所有接收到的消息(包括0 码力 | 70 页 | 82.33 KB | 2 年前3
Get off my thread: Techniques for moving k to background threadsjust need to move the work, we need to prevent blocking on our event-handling threads. void event_handler() { auto handle = spawn_background_task(); handle.wait(); // no benefit } ## Aside: Non-Blocking thread for each event handler ## How do we move work off the current thread? Possible ways to move the work off the current thread: ☑ Spawn a new thread for each event handler ☑ Pass data to a dedicated thread? Possible ways to move the work off the current thread: ☑ Spawn a new thread for each event handler ☑ Pass data to a dedicated background thread ☑ Submit tasks to a generic thread pool ## How do0 码力 | 90 页 | 6.97 MB | 1 年前3
Working with Asynchrony Generically: A Tour of C++ ExecutorsA handle to a compute resource (aka, scheduler) A unit of lazy async work (aka, sender) A completion handler (aka, receiver) A small, initial set of generic async algorithms: E.g., then, when_all, sync_wait callback that reads the completion info out of the global and completes it if it's not null. ## KEYCLICK SENDER // Type-erased receiver waiting for a keyclick: struct pending_completion { virtual void complete(char) = 0; virtual ~pending_completion() {} }; // Global registration of next completion: std::atomiccompletion*> pending_completion_{nullptr}; // Keyboard input callback to 0 码力 | 121 页 | 7.73 MB | 1 年前3
electron中文教程
registerFileProtocol(scheme, handler[, completion]) • scheme String • handler Function • completion Function(可选) 注册一个协议,用来发送响应文件。当通过这个协议来发起一个请求的时候,将使用 handler(request, protocol callback) 来调用 handler. 当 scheme 被成功注册或者完成(错误)时失败,将使用 被成功注册或者完成(错误)时失败,将使用 completion(null) 调用 completion. - callback Function uploadData 是一个 data 对象数组: • data Object 当不使用任何参数调用 callback 时,你可以指定一个数字或一个带有 error 参数的对象,来标识 request 失败。你可以使用的 error number 可以参考 registerStandardSchemes 来创建一个标准的 scheme. protocol.registerBufferProtocol(scheme, handler[, completion]) - scheme String - handler Function - completion Function (可选) 注册一个 scheme 协议,用来发送响应 Buffer . 这个方法的用法类似 registerFileProtocol,除非使用一个0 码力 | 203 页 | 2.72 MB | 2 年前3
Apache Karaf Container 4.x - DocumentationScript Templates 4.5. Using the console 4.5.1. Available commands 4.5.2. Subshell and completion mode 4.5.3. Unix like environment 4.5.4. Security 4.6. Remote 4.6.1. SSHd server 4 config:* commands 4.8.4. JMX ConfigMBean 4.9. Artifacts repositories and URLs 4.9.1. Maven URL Handler 4.9.2. Maven configuration commands 4.10. Provisioning 4.10.1. Application 4.10.2. OSGi service 5.30. Websocket 5.31. Scheduler 5.32. Quick example with Apache Camel 5.33. Custom URL handler 5.34. Integration Tests 5.35. Distributions & Docker 5.36. Github Contributions 5.36.1. Introduction0 码力 | 370 页 | 1.03 MB | 1 年前3
Apache Karaf 3.0.5 GuidesNote that the console supports tab completion so if your start typing a command it will show possible completions and also auto complete if there is only one completion. ## DEPLOY A SAMPLE APPLICATION list of all commands: karaf@root()> Display all 280 possibilities? (y or n) ## SUBSHELL AND COMPLETION MODE The commands have a scope and a name. For instance, the command feature:list has feature > The completion mode defines the behaviour of the tab key and the help command. You have three different modes available: • GLOBAL • FIRST • SUBSHELL You can define your default completion mode using0 码力 | 203 页 | 534.36 KB | 1 年前3
共 1000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
Networking TSasynchronous operationsinjected operationscompletion handlerNetTSResponseStreamHandlerMiddlewareClientGuzzleHTTP clientRequestI/O ObjectsExecutorsCompletion handlersOwnership cyclesExecutionContextWeRoBotSessionMessage微信公众号开发background threadsspawn a new threaddedicated background threadthread poolevent handlerC++ Executorssendersreceiversstructured concurrencycoroutinesElectron主进程渲染进程IPC通信构建指南Apache Karaf Container 4.xFeatures repositoriesFeatures resolverNamespacesMaven pluginOSGiApache KarafSSHJMXMaven













