mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
reinstated the legacy UDP#write for jruby, because there's no sendmsg_nonblock
This commit is contained in:
parent
6e4ce5a638
commit
53b894170d
@ -84,6 +84,14 @@ module HTTPX
|
||||
rescue IOError
|
||||
end
|
||||
end
|
||||
|
||||
# In JRuby, sendmsg_nonblock is not implemented
|
||||
def write(buffer)
|
||||
siz = @io.send(buffer.to_s, 0, @host, @port)
|
||||
log { "WRITE: #{siz} bytes..." }
|
||||
buffer.shift!(siz)
|
||||
siz
|
||||
end if RUBY_ENGINE == "jruby"
|
||||
# :nocov:
|
||||
end
|
||||
end
|
||||
|
@ -150,6 +150,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def load_dependencies(klass)
|
||||
require "digest/sha2"
|
||||
require "openssl"
|
||||
klass.plugin(:expect)
|
||||
klass.plugin(:compression)
|
||||
|
Loading…
x
Reference in New Issue
Block a user