summaryrefslogtreecommitdiff
path: root/src/ServerConnection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ServerConnection.cpp')
-rw-r--r--src/ServerConnection.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ServerConnection.cpp b/src/ServerConnection.cpp
index d9e0203..afe9bcb 100644
--- a/src/ServerConnection.cpp
+++ b/src/ServerConnection.cpp
@@ -1,13 +1,13 @@
#include "ServerConnection.h"
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <signal.h>
+#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <sys/types.h>
-#include <signal.h>
#include <unistd.h>
-#include <arpa/inet.h>
-#include <sys/time.h>
-#include <sys/ioctl.h>
-#include <netdb.h>
#include "ClientConnection.h"
@@ -26,11 +26,11 @@ ServerConnection::ServerConnection(int port)
error_and_die("Failed to create socket");
if (setsockopt(m_socket_fd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &socket_options, sizeof(socket_options)))
- error_and_die("setsockopt");
+ error_and_die("setsockopt");
- address.sin_family = AF_INET;
+ address.sin_family = AF_INET;
address.sin_addr.s_addr = htonl(INADDR_ANY);
- address.sin_port = htons(port);
+ address.sin_port = htons(port);
if ((bind(m_socket_fd, (sockaddr*)&address, sizeof(address))) < 0)
error_and_die("bind");