Jamoma API  0.6.0.a19
TTWebReceive.h
1 /*
2  * @file TTWebReceive.h
3  * @group network library
4  * @brief Jamoma WebSocket Receiver
5  * @see TTWebSocket, TTWebSend
6  *
7  * @copyright © 2013, Laurent Garnier
8  * License: This code is licensed under the terms of the "New BSD License"
9  * http://creativecommons.org/licenses/BSD/
10  */
11 
12 #ifndef __TT_WEB_RECEIVE_H__
13 #define __TT_WEB_RECEIVE_H__
14 
15 #include "TTFoundationAPI.h"
16 #include "TTWebSocket.h"
17 
18 
19 /**
20  * TTWebReceive is a websocket protocol receiver class
21  */
24 
25 public:
26  TTUInt16 mPort; ///< port number
27  TTSymbol mHtmlPath; ///< path to index.html file
28  TTWebSocketPtr mSocket;
29  TTObject mCallback; ///< an optionnal callback to get message and baton data back
30 
31  // internal method
32  TTErr bind();
33 
34  /** Setter */
35  TTErr setPort(const TTValue& value);
36 
37  /** Setter */
38  TTErr setHtmlPath(const TTValue& value);
39 
40  /** Callback from socket receive */
41  TTErr WebSocketReceive(const TTValue& message, TTValue& unusedOutput);
42 
43 };
45 
46 
47 #endif // __TT_WEB_RECEIVE_H__
std::uint16_t TTUInt16
16 bit unsigned integer
Definition: TTBase.h:176
TTObject mCallback
an optionnal callback to get message and baton data back
Definition: TTWebReceive.h:29
Create a websocket server.
Definition: TTWebSocket.h:47
TTErr setHtmlPath(const TTValue &value)
Setter.
TTWebReceive is a websocket protocol receiver class.
Definition: TTWebReceive.h:22
Create and use Jamoma object instances.
Definition: TTObject.h:29
TTDataObjectBase is the base class for all data generating and processing objects.
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
Definition: TTSymbol.h:26
TTUInt16 mPort
port number
Definition: TTWebReceive.h:26
TTErr setPort(const TTValue &value)
Setter.
TTSymbol mHtmlPath
path to index.html file
Definition: TTWebReceive.h:27
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTErr WebSocketReceive(const TTValue &message, TTValue &unusedOutput)
Callback from socket receive.
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34