class WebSocket::Driver::Proxy

def parse(chunk)

def parse(chunk)
  @http.parse(chunk)
  return unless @http.complete?
  @status  = @http.code
  @headers = Headers.new(@http.headers)
  if @status == 200
    emit(:connect, ConnectEvent.new)
  else
    message = "Can't establish a connection to the server at #{ @socket.url }"
    emit(:error, ProtocolError.new(message))
  end
end