Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ void Server::run() {
struct sockaddr_in cli_addr;
socklen_t clilen;
clilen = sizeof(cli_addr);
SOCKET newsc;
_SOCKET newsc;

while (true) {
newsc = ::accept(sc_, (struct sockaddr*)&cli_addr, &clilen);
Expand Down
6 changes: 3 additions & 3 deletions server/server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "route.hpp"

#ifdef _WIN32
typedef unsigned SOCKET;
typedef unsigned _SOCKET;
#else
typedef int SOCKET;
typedef int _SOCKET;
#endif

class TemplateParser;
Expand Down Expand Up @@ -82,7 +82,7 @@ class Server {
};

private:
SOCKET sc_;
_SOCKET sc_;
int port_;
std::vector<Route*> routes_;
RequestHandler* notFoundHandler_;
Expand Down