class ProxyProtocol::Socket

Public Class Methods

new(domain, socktype, protocol=0, source_ip=nil, source_port=nil, dest_ip=nil, dest_port=nil, local_host=nil, local_port=nil) click to toggle source
Calls superclass method
# File lib/proxyprotocol/socket.rb, line 6
def initialize(domain, socktype, protocol=0, source_ip=nil, source_port=nil,
               dest_ip=nil, dest_port=nil, local_host=nil, local_port=nil)
  @header = proxy_protocol_header(source_ip, source_port, dest_ip,
                                  dest_port)
  super(domain, socktype, protocol=0)
end

Public Instance Methods

connect(remote_sockaddr) click to toggle source
Calls superclass method
# File lib/proxyprotocol/socket.rb, line 13
def connect(remote_sockaddr)
  super
  write(@header)
end