Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/tcpserver.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/net/tcpserver.cc b/src/net/tcpserver.cc
index 3276f87..5b68a65 100644
--- a/src/net/tcpserver.cc
+++ b/src/net/tcpserver.cc
@@ -28,14 +28,14 @@ TCPServer::TCPServer(std::string const host, unsigned int const port)
tcpserver_fd = -1;
tcpserver_error = true;
- con_print << "Initializing network..." << std::endl;
+ con_print << "Initializing network server..." << std::endl;
// initialize socket
tcpserver_fd = ::socket(PF_INET, SOCK_STREAM, 0);
if (tcpserver_fd == -1) {
// FIXME error handling
con_error << "Network can't create socket!" << std::endl;
- perror("socket");
+ //perror("socket");
return;
}
@@ -44,7 +44,7 @@ TCPServer::TCPServer(std::string const host, unsigned int const port)
if (::setsockopt(tcpserver_fd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(socklen_t)) == -1) {
// FIXME error handling
std::cerr << "Network can't set socket options!" << std::endl;
- perror("setsockopt");
+ //perror("setsockopt");
return;
}
@@ -60,7 +60,7 @@ TCPServer::TCPServer(std::string const host, unsigned int const port)
if (::bind(tcpserver_fd, (struct sockaddr *) &listen_addr, sizeof(struct sockaddr)) == -1) {
// FIXME error handling
con_error << "Network can't bind to local address!" << std::endl;
- perror("bind");
+ //perror("bind");
return;
}
@@ -68,7 +68,7 @@ TCPServer::TCPServer(std::string const host, unsigned int const port)
if (::listen(tcpserver_fd, MAXPENDINGCONNECTIONS) == -1) {
// FIXME error handling
con_error << "Network failed to listen on socket!" << std::endl;
- perror("listen");
+ //perror("listen");
return;
}
@@ -119,7 +119,7 @@ void TCPServer::accept()
if (clientfd == -1) {
// FIXME error handling
con_error << "Network accept() error!" << std::endl;
- perror("accept");
+ //perror("accept");
return;
} else {
std::string host(inet_ntoa(client_addr.sin_addr));