Class: Shadowsocks::Parser::Server

Inherits:
Base
  • Object
show all
Defined in:
lib/shadowsocks/parser/server.rb

Instance Attribute Summary

Attributes inherited from Base

#data, #mode

Instance Method Summary collapse

Methods inherited from Base

#addr_to_send, #header_length, #initialize, #remote_addr, #remote_port

Constructor Details

This class inherits a constructor from Shadowsocks::Parser::Base

Instance Method Details

#addr_lenObject



8
9
10
11
12
# File 'lib/shadowsocks/parser/server.rb', line 8

def addr_len
  if mode == :domain
    data[1].unpack('c')[0]
  end
end

#addr_typeObject



4
5
6
# File 'lib/shadowsocks/parser/server.rb', line 4

def addr_type
  data[0]
end