]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/raw_socket.hxx
Ensure individual log-level setting works.
[simgear.git] / simgear / io / raw_socket.hxx
index 2b5031f31df0a7bdec937def8772b5447c504dcc..833b75c3ba3d8d6c4d929f34eef744478ed0546e 100644 (file)
@@ -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 () ;