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:
parent
617a74a8e9
commit
a267d9b32a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user