]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_socket.hxx
Fix a build order problem.
[simgear.git] / simgear / io / sg_socket.hxx
index e775eb3b936ac5d60a37a0d6aeb666655e59e71e..0d393f4f1b4e897320f722f5da7c6b09f50e41d8 100644 (file)
@@ -34,8 +34,7 @@
 #include STL_STRING
 
 #include <simgear/math/sg_types.hxx>
-
-#include "iochannel.hxx"
+#include <simgear/io/iochannel.hxx>
 
 FG_USING_STD(string);
 
@@ -63,9 +62,12 @@ private:
     int save_len;
 
     SocketType sock;
+    SocketType msgsock;
     short unsigned int port;
     int sock_style;                    // SOCK_STREAM or SOCK_DGRAM
 
+    bool first_read;
+
     // make a server (master listening) socket
     SocketType make_server_socket();
 
@@ -93,7 +95,7 @@ public:
     // If specified as a server (in direction for now) open the master
     // listening socket.  If specified as a client (out direction),
     // open a connection to a server.
-    bool open( SGProtocolDir dir );
+    bool open( const SGProtocolDir d );
 
     // read data from socket
     int read( char *buf, int length );
@@ -102,10 +104,10 @@ public:
     int readline( char *buf, int length );
 
     // write data to a socket
-    int write( char *buf, int length );
+    int write( const char *buf, const int length );
 
     // write null terminated string to a socket
-    int writestring( char *str );
+    int writestring( const char *str );
 
     // close file
     bool close();