aboutsummaryrefslogtreecommitdiffstats
path: root/common/network/Socket.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/network/Socket.cxx')
-rw-r--r--common/network/Socket.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/network/Socket.cxx b/common/network/Socket.cxx
index 78484f51..8da44366 100644
--- a/common/network/Socket.cxx
+++ b/common/network/Socket.cxx
@@ -71,7 +71,7 @@ bool network::isSocketListening(int sock)
}
Socket::Socket(int fd)
- : instream(0), outstream(0),
+ : instream(nullptr), outstream(nullptr),
isShutdown_(false), queryConnection(false)
{
initSockets();
@@ -79,7 +79,7 @@ Socket::Socket(int fd)
}
Socket::Socket()
- : instream(0), outstream(0),
+ : instream(nullptr), outstream(nullptr),
isShutdown_(false), queryConnection(false)
{
initSockets();
@@ -128,14 +128,14 @@ void Socket::setFd(int fd)
isShutdown_ = false;
}
-SocketListener::SocketListener(int fd)
- : fd(fd), filter(0)
+SocketListener::SocketListener(int fd_)
+ : fd(fd_), filter(nullptr)
{
initSockets();
}
SocketListener::SocketListener()
- : fd(-1), filter(0)
+ : fd(-1), filter(nullptr)
{
initSockets();
}
@@ -160,14 +160,14 @@ Socket* SocketListener::accept() {
int new_sock = -1;
// Accept an incoming connection
- if ((new_sock = ::accept(fd, 0, 0)) < 0)
+ if ((new_sock = ::accept(fd, nullptr, nullptr)) < 0)
throw SocketException("unable to accept new connection", errorNumber);
// Create the socket object & check connection is allowed
Socket* s = createSocket(new_sock);
if (filter && !filter->verifyConnection(s)) {
delete s;
- return NULL;
+ return nullptr;
}
return s;