X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstreamsocket.h;h=37c5b8e09ae762975fc2c98d1747ddf6a7969bf0;hb=28e7bf7a13656620452e19d017ea5eedf14a8bc5;hp=0bba5c39c1be7adff4d06cc85802368871b7610a;hpb=f59eded7c3e162bbdfc6db424c9badc730017698;p=libs%2Fnet.git diff --git a/source/streamsocket.h b/source/streamsocket.h index 0bba5c3..37c5b8e 100644 --- a/source/streamsocket.h +++ b/source/streamsocket.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspnet -Copyright © 2008 Mikkosoft Productions, Mikko Rasa -Distributed under the LGPL -*/ - #ifndef MSP_NET_STREAMSOCKET_H_ #define MSP_NET_STREAMSOCKET_H_ @@ -16,6 +9,9 @@ namespace Net { class StreamSocket: public Socket { friend class StreamListenSocket; +private: + bool connecting; + public: /** Emitted when the socket finishes connecting. The argument is a standard @@ -23,14 +19,15 @@ public: */ sigc::signal signal_connect_finished; - StreamSocket(Family, int =0); - bool get_connecting() const { return connecting; } - int poll_connect(const Time::TimeDelta &); - int connect(const SockAddr &); private: - bool connecting; - StreamSocket(SocketHandle, const SockAddr &); +public: + StreamSocket(Family, int = 0); + + virtual int connect(const SockAddr &); + bool is_connecting() const { return connecting; } + int poll_connect(const Time::TimeDelta &); +private: void on_event(IO::PollEvent); };