00001 #ifndef __TRANSPORTLAYER_H 00002 #define __TRANSPORTLAYER_H 00003 00004 #include "ServiceTable.h" 00005 #include "NetworkLayer.h" 00006 00007 class TransportLayer 00008 { 00009 public: 00010 OS_SPEC_ENUM ReturnCode { 00011 DEAD = -100, 00012 NOT_CONNECTED = -101 00013 }; 00014 00015 TransportLayer(); 00016 ~TransportLayer(); 00017 00018 int connect(); 00019 int listenAccept(); 00020 int send(int serviceNumber, u_char *msg, int length); 00021 int receive(int serviceNumber, u_char *msg, int length); 00022 bool disconnect(int serviceNumber); 00023 ServiceTable* getServiceTable(); 00024 NetworkLayer* getNetworkLayer(); 00025 00026 private: 00027 ServiceTable *m_serviceTable; 00028 }; 00029 00030 #endif // __TRANSPORTLAYER_H