about summary refs log tree commit homepage
path: root/lib/yahns/openssl_client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/openssl_client.rb')
-rw-r--r--lib/yahns/openssl_client.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yahns/openssl_client.rb b/lib/yahns/openssl_client.rb
index f896acd..439bc75 100644
--- a/lib/yahns/openssl_client.rb
+++ b/lib/yahns/openssl_client.rb
@@ -3,8 +3,6 @@
 # License: GPL-3.0+ (https://www.gnu.org/licenses/gpl-3.0.txt)
 # frozen_string_literal: true
 
-require_relative 'sendfile_compat'
-
 # this is to be included into a Kgio::Socket-derived class
 # this requires Ruby 2.1 and later for "exception: false"
 module Yahns::OpenSSLClient # :nodoc:
@@ -72,7 +70,7 @@ module Yahns::OpenSSLClient # :nodoc:
     @ssl.read_nonblock(len, buf, exception: false)
   end
 
-  def trysendfile(io, offset, count)
+  def trysendio(io, offset, count)
     return 0 if count == 0
 
     unless buf = @ssl_blocked
@@ -97,6 +95,8 @@ module Yahns::OpenSSLClient # :nodoc:
     @ssl.sysclose
   end
 
+  alias trysendfile trysendio
+
   def close
     @ssl.close # flushes SSLSocket
     super # IO#close