Module: EventMachine::Connectify::CONNECT

### Home Classes Methods

### In Files

- lib/em-socksify/connect.rb

### Methods

- #connect_send_handshake

### Class/Module Index

Quicksearch

- EventMachine
- EventMachine::Connectify
- EventMachine::Connectify::CONNECT
- EventMachine::Connectify::CONNECTError
- EventMachine::Socksify
- EventMachine::Socksify::SOCKS5
- EventMachine::Socksify::SOCKSError
- Base64

No matching classes.

# EventMachine::Connectify::CONNECT

### Public Instance Methods

connect_send_handshake() click to toggle source

    # File lib/em-socksify/connect.rb, line 4
    def connect_send_handshake
      header =  "CONNECT #{@connect_target_host}:#{@connect_target_port} HTTP/1.0\r\n"
      if @connect_username || @connect_password
        encoded_credentials = Base64.strict_encode64([@connect_username, @connect_password].join(":"))
        header << "Proxy-Authorization: Basic #{encoded_credentials}\r\n"
      end

      header << "\r\n"
      send_data(header)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.