src/Network/TCP.hh
changeset 378 5589abf5e61b
parent 286 2a8f20a53ff2
child 380 d193dd1d8a7e
--- a/src/Network/TCP.hh	Mon Dec 15 16:41:00 2008 +0000
+++ b/src/Network/TCP.hh	Mon Dec 15 23:56:42 2008 +0000
@@ -26,7 +26,7 @@
         /**
          * The SOCK_STREAM socket
          */
-        NetworkSocket socket;
+        NetworkSocket *socket;
         
         /**
          * Our input buffer associated with socket
@@ -44,7 +44,12 @@
         /**
          * Construct this using the given socket
          */
-        NetworkTCPTransport (NetworkSocket socket);
+        NetworkTCPTransport (NetworkSocket *socket);
+        
+        /**
+         * Deletes the socket
+         */
+        ~NetworkTCPTransport (void);
 
     private:
         /**
@@ -56,11 +61,6 @@
          * Triggered when the socket is read for send
          */
         void on_write (void);
-
-        /**
-         * Triggered when the socket is disconnected (?)
-         */
-        void on_disconnected (void);
         
         /**
          * The packet-read signal
@@ -74,14 +74,14 @@
 
     public:
         /**
-         * Get this TCP socket's local ddress
+         * Get this TCP socket's local address
          */
-        NetworkAddress getLocalAddress (void) { return socket.get_source_address(); }
+        NetworkAddress getLocalAddress (void) { return socket->get_local_address(); }
 
         /**
          * Get this TCP socket's remote address
          */
-        NetworkAddress getRemoteAddress (void) { return socket.get_dest_address(); }
+        NetworkAddress getRemoteAddress (void) { return socket->get_remote_address(); }
         
         /**
          * Write the given packet to this socket output, buffering the data if need be
@@ -138,7 +138,7 @@
          *
          * @param socket the socket returned by accept()
          */
-        virtual NetworkTCPTransport* buildTransport (CL_Socket &socket);
+        virtual NetworkTCPTransport* buildTransport (NetworkSocket *socket);
 
     public:
         /**