X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fraw_socket.hxx;h=833b75c3ba3d8d6c4d929f34eef744478ed0546e;hb=adb7db9229db1d869b254ac18f1471bed464c508;hp=2b5031f31df0a7bdec937def8772b5447c504dcc;hpb=ef48baafcc88e53ef252389beb2797161ef7d9be;p=simgear.git diff --git a/simgear/io/raw_socket.hxx b/simgear/io/raw_socket.hxx index 2b5031f3..833b75c3 100644 --- a/simgear/io/raw_socket.hxx +++ b/simgear/io/raw_socket.hxx @@ -17,7 +17,7 @@ You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef SG_IO_SOCKET_HXX @@ -40,18 +40,23 @@ namespace simgear */ class IPAddress { - struct sockaddr_in* addr; + mutable struct sockaddr_in* addr; public: IPAddress () : addr(0) {} IPAddress ( const char* host, int port ) ; ~IPAddress(); + static bool lookupNonblocking(const char* host, IPAddress& addr); + IPAddress( const IPAddress& other ); const IPAddress& operator=(const IPAddress& other); + bool isValid () const; void set ( const char* host, int port ) ; const char* getHost () const ; unsigned int getPort() const ; + void setPort(int port); + unsigned int getIP () const ; unsigned int getFamily () const ; static const char* getLocalHost () ; @@ -69,7 +74,7 @@ public: class Socket { int handle ; - + public: Socket () ;