Jamoma API  0.6.0.a19
WebSocketAnswer.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup modularWebSocket
4  *
5  * @brief WebSocket Answer
6  *
7  * @details
8  *
9  * @authors Laurent Garnier, Théo de la Hogue
10  *
11  * @copyright © 2011, Laurent Garnier, Théo de la Hogue @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #ifndef WEBSOCKETANSWER_HPP_
18 #define WEBSOCKETANSWER_HPP_
19 
20 #include "WebSocketInclude.h"
21 
22 class WebSocketAnswer
23 {
24  TTThreadPtr mThread; // a thread used to wait an answer
25 
26 private:
27  TTValue mAnswer;
28 
29  int mState;
30  long long mLaunchTimeInMs;
31  int mTimeOutInMs;
32 
33 public:
34  WebSocketAnswer();
35  virtual ~WebSocketAnswer();
36 
37  void setAnswer(const TTValue& value, TTErr error = kTTErrNone);
38  void getAnswer(TTValue& value);
39 
40  void setTimeOut(int timeout);
41 
42  void wait();
43 
44  int getState();
45 };
46 
47 typedef WebSocketAnswer* WebSocketAnswerPtr;
48 
49 #endif /*WEBSOCKETANSWER_HPP_*/
It's the WebSocket protocol.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
No Error.
Definition: TTBase.h:343
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34