move to PIIOTextStream

This commit is contained in:
2022-05-13 13:24:09 +03:00
parent 1028233553
commit f67e3030b9
6 changed files with 217 additions and 188 deletions

View File

@@ -19,6 +19,7 @@
#include "pip.h"
#include "picrypt.h"
#include "piiostream.h"
#include "dispatcherserver.h"
@@ -72,9 +73,10 @@ int main (int argc, char * argv[]) {
uint max_connections = 1000;
if (!PIFile::isExists(conf_path)) {
PIFile f(conf_path, PIIODevice::ReadWrite);
f << "ip = " << addr.ipString() << "\n"
<< "port = " << addr.port() << "\n"
<< "max_connections = " << max_connections << "\n";
PIIOTextStream ts(&f);
ts << "ip = " << addr.ipString() << "\n"
<< "port = " << addr.port() << "\n"
<< "max_connections = " << max_connections << "\n";
}
{
PIConfig conf(conf_path, PIIODevice::ReadOnly);