Add client mode to TcpStream

This commit is contained in:
badaix 2019-11-28 20:07:43 +01:00
parent 43c58febd7
commit fd616956cb
3 changed files with 75 additions and 21 deletions

View file

@ -66,6 +66,18 @@ static int stoi(const std::string& str)
#endif
}
static int stoi(const std::string& str, int def)
{
try
{
return cpt::stoi(str);
}
catch(...)
{
return def;
}
}
static double stod(const std::string& str)
{
#ifdef NO_CPP11_STRING