Commit 349263a8 authored by Jack Andersen's avatar Jack Andersen

Logging changes

parent c06141af
......@@ -98,7 +98,7 @@ bool Socket::openSocket()
m_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (m_socket == -1)
{
fprintf(stderr, "Can't allocate socket");
fprintf(stderr, "Can't allocate socket\n");
return false;
}
......@@ -158,14 +158,14 @@ bool Socket::openAndListen(const IPAddress& address, uint32_t port)
if (bind(m_socket, reinterpret_cast<sockaddr*>(&addr), sizeof(addr)) == -1)
{
/* Not likely to happen, but... */
fprintf(stderr, "Failed to bind listener socket to port %d", port);
//fprintf(stderr, "Failed to bind listener socket to port %d\n", port);
return false;
}
if (::listen(m_socket, 0) == -1)
{
/* Oops, socket is deaf */
fprintf(stderr, "Failed to listen to port %d", port);
//fprintf(stderr, "Failed to listen to port %d\n", port);
return false;
}
......@@ -187,7 +187,7 @@ Socket::EResult Socket::accept(Socket& remoteSocketOut, sockaddr_in& fromAddress
#ifndef _WIN32
EResult res = (errno == EAGAIN) ? EResult::Busy : EResult::Error;
if (res == EResult::Error)
fprintf(stderr, "Failed to accept incoming connection: %s", strerror(errno));
fprintf(stderr, "Failed to accept incoming connection: %s\n", strerror(errno));
#else
EResult res = LastWSAError();
if (res == EResult::Error)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment