Class: Net::HTTPGenericRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/base/net_fix.rb

Overview

– Net::HTTPGenericRequest –

Constant Summary collapse

DEFAULT_LOCAL_READ_SIZE =

Default size (in bytes) of the max read from a local source (File, String, etc.) to the user space write buffers for socket IO.

16*1024
@@local_read_size =
DEFAULT_LOCAL_READ_SIZE

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.local_read_size=(readsize) ⇒ Object



71
72
73
74
75
76
# File 'lib/base/net_fix.rb', line 71

def self.local_read_size=(readsize)
  if(readsize <= 0)
    return
  end
  @@local_read_size = readsize
end

.local_read_size?Boolean

Returns:

  • (Boolean)


78
79
80
# File 'lib/base/net_fix.rb', line 78

def self.local_read_size?()
  @@local_read_size
end

Instance Method Details

#exec(sock, ver, path, send_only = nil) ⇒ Object

:nodoc: internal use only



82
83
84
85
86
87
88
89
90
# File 'lib/base/net_fix.rb', line 82

def exec(sock, ver, path, send_only=nil)   #:nodoc: internal use only
  if @body
    send_request_with_body sock, ver, path, @body, send_only
  elsif @body_stream
    send_request_with_body_stream sock, ver, path, @body_stream, send_only
  else
    write_header(sock, ver, path)
  end
end