Class: Net::HTTPGenericRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/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



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

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

.local_read_size?Boolean

Returns:

  • (Boolean)


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

def self.local_read_size?()
  @@local_read_size
end

Instance Method Details

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

:nodoc: internal use only



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

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