Skip to content

Commit

Permalink
Add 'transport_type' for server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Barenboim committed Mar 5, 2024
1 parent a0890fa commit 2a0ac54
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/server/WFDnsServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ using WFDnsServer = WFServer<protocol::DnsRequest,

static constexpr struct WFServerParams DNS_SERVER_PARAMS_DEFAULT =
{
/* .transport_type = */ TT_TCP,
/* .max_connections = */ 2000,
/* .peer_response_timeout = */ 10 * 1000,
/* .receive_timeout = */ -1,
Expand Down
1 change: 1 addition & 0 deletions src/server/WFHttpServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ using WFHttpServer = WFServer<protocol::HttpRequest,

static constexpr struct WFServerParams HTTP_SERVER_PARAMS_DEFAULT =
{
/* .transport_type = */ TT_TCP,
/* .max_connections = */ 2000,
/* .peer_response_timeout = */ 10 * 1000,
/* .receive_timeout = */ -1,
Expand Down
1 change: 1 addition & 0 deletions src/server/WFMySQLServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class MySQLServer;

static constexpr struct WFServerParams MYSQL_SERVER_PARAMS_DEFAULT =
{
/* .transport_type = */ TT_TCP,
/* .max_connections = */ 2000,
/* .peer_response_timeout = */ 10 * 1000,
/* .receive_timeout = */ -1,
Expand Down
1 change: 1 addition & 0 deletions src/server/WFRedisServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ using WFRedisServer = WFServer<protocol::RedisRequest,

static constexpr struct WFServerParams REDIS_SERVER_PARAMS_DEFAULT =
{
/* .transport_type = */ TT_TCP,
/* .max_connections = */ 2000,
/* .peer_response_timeout = */ 10 * 1000,
/* .receive_timeout = */ -1,
Expand Down
3 changes: 3 additions & 0 deletions src/server/WFServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
#include <openssl/ssl.h>
#include "PlatformSocket.h"
#include "CommScheduler.h"
#include "EndpointParams.h"
#include "WFTaskFactory.h"

struct WFServerParams
{
enum TransportType transport_type;
size_t max_connections;
int peer_response_timeout; /* timeout of each read or write operation */
int receive_timeout; /* timeout of receiving the whole message */
Expand All @@ -42,6 +44,7 @@ struct WFServerParams

static constexpr struct WFServerParams SERVER_PARAMS_DEFAULT =
{
/* .transport_type = */ TT_TCP,
/* .max_connections = */ 2000,
/* .peer_response_timeout = */ 10 * 1000,
/* .receive_timeout = */ -1,
Expand Down

0 comments on commit 2a0ac54

Please sign in to comment.