1 # Copyright (C) 2015 all contributors <kgio-public@bogomips.org>
2 # License: LGPLv2.1 or later (https://www.gnu.org/licenses/lgpl-2.1.txt)
4 # using this code is not recommended, for backwards compatibility only
5 module Kgio::Autopush::SockRW # :nodoc:
8 def kgio_read(*) # :nodoc:
13 def kgio_read!(*) # :nodoc:
14 kgio_push_pending_data
18 def kgio_tryread(*) # :nodoc:
19 kgio_push_pending_data
23 def kgio_trypeek(*) # :nodoc:
24 kgio_push_pending_data
28 def kgio_peek(*) # :nodoc:
29 kgio_push_pending_data
33 def kgio_syssend(*) # :nodoc:
34 kgio_push_pending_data(super)
35 end if Kgio::SocketMethods.method_defined?(:kgio_syssend)
37 def kgio_trysend(*) # :nodoc:
38 kgio_ap_wrap_writer(super)
41 def kgio_trywrite(*) # :nodoc:
42 kgio_ap_wrap_writer(super)
45 def kgio_trywritev(*) # :nodoc:
46 kgio_ap_wrap_writer(super)
49 def kgio_write(*) # :nodoc:
50 kgio_ap_wrap_writer(super)
53 def kgio_writev(*) # :nodoc:
54 kgio_ap_wrap_writer(super)
59 def kgio_ap_wrap_writer(rv) # :nodoc:
61 when :wait_readable, :wait_writable
62 kgio_push_pending_data