X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fstreamsocket.cpp;h=2576009452bddcb9df8ee22898c42ce612fcc171;hp=c5e19685f6f2cd615f6c34aa8532b045f7c691b2;hb=729a80158708fd499d942663eb5115d93d247f46;hpb=a81c41acd873cda7f40bca634782230d9e57dc4f diff --git a/source/streamsocket.cpp b/source/streamsocket.cpp index c5e1968..2576009 100644 --- a/source/streamsocket.cpp +++ b/source/streamsocket.cpp @@ -3,15 +3,12 @@ #endif #include #include -#include +#include #include "streamsocket.h" 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) @@ -22,20 +19,11 @@ StreamSocket::StreamSocket(SocketHandle h, const SockAddr &paddr): set_events(IO::P_INPUT); } -/** -Constructs a new StreamSocket. -*/ StreamSocket::StreamSocket(Family af, int proto): Socket(af, SOCK_STREAM, proto), connecting(false) { } -/** -Checks the status of an ongoing connection attempt. If the connection fails -with an error, an exception is thrown. - -@return 0 if the connection finished, 1 if not -*/ int StreamSocket::poll_connect(const Time::TimeDelta &timeout) { check_state(false); @@ -80,14 +68,6 @@ int StreamSocket::poll_connect(const Time::TimeDelta &timeout) return 1; } -/** -Connects the socket to a remote address. In non-blocking mode, this function -may return before the connection is finished. The caller must then use either -the poll_connect function or an EventDispatcher to determine when the -connection is finished. - -@return 0 if the connection finished, 1 if it is in progress -*/ int StreamSocket::connect(const SockAddr &addr) { check_state(false); @@ -146,7 +126,6 @@ int StreamSocket::connect(const SockAddr &addr) void StreamSocket::on_event(IO::PollEvent ev) { - //cout<<"StreamSocket::on_event "<