src/proto2/Network.hh
changeset 21 32c6cc55256a
parent 15 7710cce889b2
child 22 b70d30e1b0fe
--- a/src/proto2/Network.hh	Fri Nov 07 21:40:32 2008 +0000
+++ b/src/proto2/Network.hh	Sat Nov 08 18:02:58 2008 +0000
@@ -1,25 +1,21 @@
 #ifndef NETWORK_HH
 #define NETWORK_HH
 
+#include "NetworkConfig.hh"
+#include "GameState.hh"
+
 #include <ClanLib/network.h>
 
-#include "NetworkConfig.hh"
-
-class NetworkBase {
+class NetworkCore {
 	protected:
-		CL_Socket socket;
+		GameState &state;
 
-		NetworkBase () : 
-				socket(CL_Socket::udp)
-		{
-				socket.set_nonblocking(true);
-		}
+		CL_SlotContainer slots;
 
-		NetworkBase (CL_Socket socket) :
-				socket(socket)
-		{
-				socket.set_nonblocking(true);
-		}
+		CL_NetSession netsession;
+		
+		// constructor
+		NetworkCore (GameState &state) : state(state), netsession(NETWORK_APP_NAME) { }
 };
 
 #endif