Jamoma API  0.6.0.a19
TTNetSend.h
1 /*
2  * Jamoma Network Sender
3  * Copyright © 2010, Tim Place
4  *
5  * License: This code is licensed under the terms of the "New BSD License"
6  * http://creativecommons.org/licenses/BSD/
7  */
8 
9 #ifndef __TT_NETSEND_H__
10 #define __TT_NETSEND_H__
11 
12 #include "TTFoundationAPI.h"
13 #include "TTNetSocket.h"
14 
15 
16 /** TTNetSend is a simple client that echoes input out to a network. */
17 class TTNetSend : public TTDataObjectBase {
19 
20  TTSymbol mAddress; ///< www.jamoma.org, 192.168.1.1, etc.
21  TTUInt16 mPort; ///< port number
22  TTSymbol mMode; ///< "tcp" or "udp"
23  TTNetSocketPtr mSocket;
24 
25 
26  // internal helper method
27  void connect();
28 
29 
30  /** Setter */
31  TTErr setAddress(const TTValue& value);
32 
33  /** Setter */
34  TTErr setPort(const TTValue& value);
35 
36  /** Setter */
37  TTErr setMode(const TTValue& value);
38 
39 
40  /** Transmit a message. */
41  TTErr send(const TTValue& arguments, TTValue& unusedOutput);
42 
43 };
44 
45 
46 #endif // __TT_NETSEND_H__
std::uint16_t TTUInt16
16 bit unsigned integer
Definition: TTBase.h:176
TTNetSend is a simple client that echoes input out to a network.
Definition: TTNetSend.h:17
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
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34