X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstreamlistensocket.cpp;h=68580d7627672e7041e79f1a415d5c63d8c156eb;hb=a81c41acd873cda7f40bca634782230d9e57dc4f;hp=12e98b1f6a2d3b9d40fca5f689f74e2af07a7630;hpb=1b2aabf076169e6d2049227188e464e95ac40514;p=libs%2Fnet.git diff --git a/source/streamlistensocket.cpp b/source/streamlistensocket.cpp index 12e98b1..68580d7 100644 --- a/source/streamlistensocket.cpp +++ b/source/streamlistensocket.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspnet -Copyright © 2008, 2011 Mikkosoft Productions, Mikko Rasa -Distributed under the LGPL -*/ - #include #include #include @@ -28,7 +21,7 @@ void StreamListenSocket::listen(const SockAddr &addr, unsigned backlog) { bind(addr); - int err=::listen(handle, backlog); + int err = ::listen(handle, backlog); if(err==-1) throw SystemError("Unable to listen", errno); @@ -37,7 +30,7 @@ void StreamListenSocket::listen(const SockAddr &addr, unsigned backlog) #endif set_events(IO::P_INPUT); - listening=true; + listening = true; } StreamSocket *StreamListenSocket::accept() @@ -46,10 +39,10 @@ StreamSocket *StreamListenSocket::accept() throw InvalidState("Socket is not listening"); sockaddr_storage sa; - socklen_t size=sizeof(sockaddr_storage); - SocketHandle new_h=::accept(handle, reinterpret_cast(&sa), &size); + socklen_t size = sizeof(sockaddr_storage); + SocketHandle new_h = ::accept(handle, reinterpret_cast(&sa), &size); - RefPtr paddr=SockAddr::create(sa); + RefPtr paddr = SockAddr::create(sa); return new StreamSocket(new_h, *paddr); }