diff options
author | Stijn Buys <ingar@osirion.org> | 2008-02-18 17:52:15 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-02-18 17:52:15 +0000 |
commit | 0b8582a9aa825024edbd0a21c6287bfcccec28de (patch) | |
tree | 2d9a46c60b028300b1b9133b84764b6c39964c33 /src/net | |
parent | 982562fa19bb87a3dab352e562f386f61c171b7b (diff) |
core redesign, part II
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/tcpserver.cc | 12 |
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)); |