Changeset 12 in chevmsgr for trunk/msgclnt.h
- Timestamp:
- 08/30/15 15:08:31 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/msgclnt.h
r8 r12 21 21 } SConversation; 22 22 23 typedef struct SOpenSession 24 { 25 std::string sessid; 26 std::vector<std::string> idList; 27 } SOpenSession; 28 29 typedef struct SCallback 30 { 31 int(*onChat)(SConversation &); 32 int(*onOpenSession)(SOpenSession &); 33 } SCallback; 34 23 35 class MessageQ 24 36 { … … 28 40 29 41 public: 30 void push(const Protocol::Message & parser);42 void push(const Protocol::Message & message); 31 43 32 Protocol::Message pop(const std::string & requestType );44 Protocol::Message pop(const std::string & requestType, bool isWait = true); 33 45 }; 34 46 … … 40 52 cf::network::tcp socket; 41 53 cf::task::thread listener; 54 cf::task::thread caller; 42 55 43 56 MessageQ messageQ; … … 68 81 bool tell(const SConversation & conversation); 69 82 70 SConversation listen();83 bool listen(const SCallback & callback); 71 84 };
Note:
See TracChangeset
for help on using the changeset viewer.