0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

In bufstr.hpp, added buf_append_string() methods.

This commit is contained in:
James Yonan 2015-10-27 18:18:09 -06:00
parent 617a74a8e9
commit a267d9b32a

View File

@ -87,6 +87,17 @@ namespace openvpn {
return buf;
}
// append str to buf
inline void buf_append_string(Buffer& buf, const std::string& str)
{
buf.write((unsigned char *)str.c_str(), str.length());
}
// append str to buf
inline void buf_append_string(Buffer& buf, const char *str)
{
buf.write((unsigned char *)str, std::strlen(str));
}
}
#endif