bigger buffer in tcpnet

will be improved in future
This commit is contained in:
VaclavT 2021-11-07 14:45:33 +01:00
parent 47effa61d0
commit 37d0d9b3f5
1 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,10 @@
#include "tcpnet.h" #include "tcpnet.h"
#define TCPNET_BUFFER_SIZE 131072
void error(const char *msg) { void error(const char *msg) {
// perror(msg); // perror(msg);
throw std::runtime_error(msg); throw std::runtime_error(msg);
@ -20,8 +24,6 @@ void error(const char *msg) {
TcpNet::TcpNet() {} TcpNet::TcpNet() {}
#define TCPNET_BUFFER_SIZE 16256
int TcpNet::server(int portno, std::function<std::pair<bool, std::string>(std::string)> process_request) const { int TcpNet::server(int portno, std::function<std::pair<bool, std::string>(std::string)> process_request) const {
int sockfd, newsockfd; int sockfd, newsockfd;