| 34 | uint8_t size; |
| 35 | char value[max_socks_hostname_size]; |
| 36 | void FromString (const std::string& str) |
| 37 | { |
| 38 | size = str.length(); |
| 39 | if (str.length() > max_socks_hostname_size) size = max_socks_hostname_size; |
| 40 | memcpy(value,str.c_str(),size); |
| 41 | } |
| 42 | std::string ToString() { return std::string(value, size); } |
| 43 | void push_back (char c) { value[size++] = c; } |
| 44 | }; |