X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fstreamsocket.cpp;h=30c7efd77a35d2b257785e7af1ddb6b80f0156cd;hp=0f69111204af5ee0af783a158217ece68a7ecfa4;hb=3103b110c863c19a56cc176a173cc30ddf13afec;hpb=3970ee9cf7978c462390d49e083deb740d71c6fe diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index 0f69111..30c7efd 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -16,6 +16,19 @@ Distributed under the LGPL namespace Msp { namespace Net { +/** +Used by StreamListenSocket to construct a new socket from accept. +*/ +StreamSocket::StreamSocket(SocketHandle h, const SockAddr &paddr): + Socket(h, paddr), + connecting(false) +{ +#ifdef WIN32 + WSAEventSelect(handle, event, FD_READ|FD_CLOSE); +#endif + set_events(IO::P_INPUT); +} + /** Constructs a new StreamSocket. */ @@ -137,19 +150,6 @@ int StreamSocket::connect(const SockAddr &addr) return (err==0)?0:1; } -/** -Used by StreamListenSocket to construct a new socket from accept. -*/ -StreamSocket::StreamSocket(SocketHandle h, const SockAddr &paddr): - Socket(h, paddr), - connecting(false) -{ -#ifdef WIN32 - WSAEventSelect(handle, event, FD_READ|FD_CLOSE); -#endif - set_events(IO::P_INPUT); -} - void StreamSocket::on_event(IO::PollEvent ev) { //cout<<"StreamSocket::on_event "<