async-io:本机 Ruby IO 和套接字的并发包装器-源码

上传者: 42175776 | 上传时间: 2021-08-05 16:04:22 | 文件大小: 94KB | 文件类型: ZIP
异步::IO Async::IO 提供基于构建,并为IO 、 Socket和相关类提供异步包装器。 安装 将此行添加到应用程序的 Gemfile 中: gem 'async-io' 然后执行: $ bundle 或者自己安装: $ gem install async-io 用法 基本回显服务器(来自spec/async/io/echo_spec.rb ): require 'async/io' def echo_server ( endpoint ) Async do | task | # This is a synchronous block within the current task: endpoint . accept do | client | # This is an asynchronous block within th

文件下载

资源详情

[{"title":"( 81 个子文件 94KB ) async-io:本机 Ruby IO 和套接字的并发包装器-源码","children":[{"title":"async-io-master","children":[{"title":"gems","children":[{"title":"async-v1.rb <span style='color:#111;'> 105B </span>","children":null,"spread":false},{"title":"async-head.rb <span style='color:#111;'> 137B </span>","children":null,"spread":false}],"spread":true},{"title":".github","children":[{"title":"workflows","children":[{"title":"documentation.yml <span style='color:#111;'> 631B </span>","children":null,"spread":false},{"title":"async-head.yml <span style='color:#111;'> 491B </span>","children":null,"spread":false},{"title":"development.yml <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"async-v1.yml <span style='color:#111;'> 486B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"gems.rb <span style='color:#111;'> 244B </span>","children":null,"spread":false},{"title":".rspec <span style='color:#111;'> 55B </span>","children":null,"spread":false},{"title":"examples","children":[{"title":"issues","children":[{"title":"broken_ssl.rb <span style='color:#111;'> 403B </span>","children":null,"spread":false},{"title":"pipes.rb <span style='color:#111;'> 579B </span>","children":null,"spread":false}],"spread":true},{"title":"defer","children":[{"title":"worker.rb <span style='color:#111;'> 398B </span>","children":null,"spread":false}],"spread":true},{"title":"udp","children":[{"title":"server.rb <span style='color:#111;'> 295B </span>","children":null,"spread":false},{"title":"client.rb <span style='color:#111;'> 249B </span>","children":null,"spread":false}],"spread":true},{"title":"echo","children":[{"title":"server.rb <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"client.rb <span style='color:#111;'> 453B </span>","children":null,"spread":false}],"spread":true},{"title":"chat","children":[{"title":"server.rb <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false},{"title":"client.rb <span style='color:#111;'> 1.28KB </span>","children":null,"spread":false}],"spread":true},{"title":"udp.rb <span style='color:#111;'> 536B </span>","children":null,"spread":false},{"title":"allocations","children":[{"title":"read_chunks.rb <span style='color:#111;'> 377B </span>","children":null,"spread":false},{"title":"byteslice.rb <span style='color:#111;'> 822B </span>","children":null,"spread":false},{"title":"memory.rb <span style='color:#111;'> 382B </span>","children":null,"spread":false}],"spread":true},{"title":"millions","children":[{"title":"server.rb <span style='color:#111;'> 794B </span>","children":null,"spread":false},{"title":"client.rb <span style='color:#111;'> 950B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"spec","children":[{"title":"addrinfo.rb <span style='color:#111;'> 286B </span>","children":null,"spread":false},{"title":"async","children":[{"title":"io","children":[{"title":"threads_spec.rb <span style='color:#111;'> 1.86KB </span>","children":null,"spread":false},{"title":"ssl_server_spec.rb <span style='color:#111;'> 4.49KB </span>","children":null,"spread":false},{"title":"protocol","children":[{"title":"line_spec.rb <span style='color:#111;'> 2.49KB </span>","children":null,"spread":false}],"spread":true},{"title":"stream_spec.rb <span style='color:#111;'> 9.05KB </span>","children":null,"spread":false},{"title":"generic_spec.rb <span style='color:#111;'> 3.45KB </span>","children":null,"spread":false},{"title":"socket","children":[{"title":"tcp_spec.rb <span style='color:#111;'> 2.83KB </span>","children":null,"spread":false},{"title":"udp_spec.rb <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false}],"spread":false},{"title":"shared_endpoint_spec.rb <span style='color:#111;'> 2.62KB </span>","children":null,"spread":false},{"title":"c10k_spec.rb <span style='color:#111;'> 3.78KB </span>","children":null,"spread":false},{"title":"standard_spec.rb <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false},{"title":"udp_socket_spec.rb <span style='color:#111;'> 1.89KB </span>","children":null,"spread":false},{"title":"socket_spec.rb <span style='color:#111;'> 3.96KB </span>","children":null,"spread":false},{"title":"tcp_socket_spec.rb <span style='color:#111;'> 2.45KB </span>","children":null,"spread":false},{"title":"echo_spec.rb <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"unix_socket_spec.rb <span style='color:#111;'> 1.94KB </span>","children":null,"spread":false},{"title":"endpoint_spec.rb <span style='color:#111;'> 3.09KB </span>","children":null,"spread":false},{"title":"ssl_socket_spec.rb <span style='color:#111;'> 3.05KB </span>","children":null,"spread":false},{"title":"stream_context.rb <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false},{"title":"notification_spec.rb <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"generic_examples.rb <span style='color:#111;'> 2.98KB </span>","children":null,"spread":false},{"title":"buffer_spec.rb <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"unix_endpoint_spec.rb <span style='color:#111;'> 2.69KB </span>","children":null,"spread":false},{"title":"shared_endpoint","children":[{"title":"server_spec.rb <span style='color:#111;'> 2.48KB </span>","children":null,"spread":false}],"spread":false},{"title":"trap_spec.rb <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false}],"spread":false}],"spread":true},{"title":"spec_helper.rb <span style='color:#111;'> 358B </span>","children":null,"spread":false}],"spread":true},{"title":".gitignore <span style='color:#111;'> 132B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"async","children":[{"title":"io","children":[{"title":"threads.rb <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"ssl_endpoint.rb <span style='color:#111;'> 3.24KB </span>","children":null,"spread":false},{"title":"peer.rb <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"binary_string.rb <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"protocol","children":[{"title":"generic.rb <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false},{"title":"line.rb <span style='color:#111;'> 2.04KB </span>","children":null,"spread":false}],"spread":false},{"title":"server.rb <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"unix_socket.rb <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"endpoint","children":[{"title":"each.rb <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false}],"spread":false},{"title":"address_endpoint.rb <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"socket_endpoint.rb <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false},{"title":"ssl_socket.rb <span style='color:#111;'> 4.34KB </span>","children":null,"spread":false},{"title":"generic.rb <span style='color:#111;'> 6.27KB </span>","children":null,"spread":false},{"title":"host_endpoint.rb <span style='color:#111;'> 3.75KB </span>","children":null,"spread":false},{"title":"shared_endpoint.rb <span style='color:#111;'> 3.01KB </span>","children":null,"spread":false},{"title":"endpoint.rb <span style='color:#111;'> 4.43KB </span>","children":null,"spread":false},{"title":"notification.rb <span style='color:#111;'> 2.00KB </span>","children":null,"spread":false},{"title":"udp_socket.rb <span style='color:#111;'> 1.80KB </span>","children":null,"spread":false},{"title":"version.rb <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"stream.rb <span style='color:#111;'> 8.14KB </span>","children":null,"spread":false},{"title":"buffer.rb <span style='color:#111;'> 1.45KB </span>","children":null,"spread":false},{"title":"socket.rb <span style='color:#111;'> 6.29KB </span>","children":null,"spread":false},{"title":"address.rb <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"tcp_socket.rb <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"trap.rb <span style='color:#111;'> 3.02KB </span>","children":null,"spread":false},{"title":"unix_endpoint.rb <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false},{"title":"standard.rb <span style='color:#111;'> 1.56KB </span>","children":null,"spread":false}],"spread":false},{"title":"io.rb <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"README.md <span style='color:#111;'> 5.51KB </span>","children":null,"spread":false},{"title":"async-io.gemspec <span style='color:#111;'> 746B </span>","children":null,"spread":false},{"title":".editorconfig <span style='color:#111;'> 52B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明