]> git.tdb.fi Git - libs/net.git/blobdiff - source/streamsocket.cpp
Header changes
[libs/net.git] / source / streamsocket.cpp
index c5e19685f6f2cd615f6c34aa8532b045f7c691b2..2576009452bddcb9df8ee22898c42ce612fcc171 100644 (file)
@@ -3,15 +3,12 @@
 #endif
 #include <cerrno>
 #include <msp/io/poll.h>
-#include <msp/strings/formatter.h>
+#include <msp/strings/format.h>
 #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 "<<ev<<'\n';
        if((ev&(IO::P_OUTPUT|IO::P_ERROR)) && connecting)
        {
                int err;