]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/raw_socket.hxx
Asynchronous host lookups+caching, attempt #2
[simgear.git] / simgear / io / raw_socket.hxx
index 6ae529f285e9f5259c0c57a4701beacb6c1c54e0..9450e9eb8729cefe97caeefbfc445172e3a3513d 100644 (file)
@@ -40,15 +40,22 @@ 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);
+
   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 () ;
@@ -66,7 +73,7 @@ public:
 class Socket
 {
   int handle ;
-
+  
 public:
   
   Socket () ;