src/network/Connection.h

00001 #ifndef CONNECTION_H_
00002 #define CONNECTION_H_
00003 
00004 #include <iostream>
00005 
00006 #include <SDL/SDL.h>
00007 #include <SDL/SDL_net.h>
00008 #include <SDL/SDL_thread.h>
00009 
00010 #include "ConnectionData.h"
00011 
00012 class ConnectionData; // Forward declarations.
00013 class Message;
00014 class MessageIn;
00015 class MessageOut;
00016 class NetPacket;
00017 
00024 class Connection
00025 {
00026 public:
00033         Connection();
00034 
00041         virtual ~Connection();
00042 
00054         static MessageIn* getMessage(TCPsocket socket);
00055 
00068         static Uint32 putMessage(TCPsocket socket, MessageOut* msg);
00069 
00079         virtual void startListen(ConnectionData * data) = 0;
00080 
00094         static int startThread(void * data);
00095 
00103         SDL_Thread* getThread();
00104 
00105         TCPsocket getSocket();
00106 
00107 protected:
00108 
00109         ConnectionData* data; 
00111 };
00112 
00113 #endif /*CONNECTION_H_*/

Generated on Mon Dec 3 04:30:13 2007 for lo-testserver by  doxygen 1.3.9.1