parent
47effa61d0
commit
37d0d9b3f5
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue