| 
    Jpp 19.3.0-rc.1
    
   the software that should make you happy 
   | 
 
ControlHost class. More...
#include <JControlHost.hh>
  
Public Member Functions | |
| JControlHost (const JHostname &server) | |
| Constructor.   | |
| JControlHost (const std::string &server, const int port) | |
| Constructor.   | |
| JControlHost (const int ip_number, const int port=DISPATCH_PORT) | |
| Constructor.   | |
| JControlHost (const JTCPSocket &socket) | |
| Constructor.   | |
| ~JControlHost () | |
| Destructor.   | |
| int | Subscribe (const JSubscription &subscription) | 
| Subscribe to single tag.   | |
| int | Subscribe (const JSubscriptionList &subscription) | 
| Subscribe to list of tags.   | |
| int | MyId (const std::string &nick_name) | 
| Identify.   | |
| int | SendMeNext () | 
| Tell server to send next message.   | |
| int | SendMeAlways () | 
| Tell server to send messages forever.   | |
| int | PutFullData (const JTag &tag, const void *buffer, const long long int length) | 
| Send data.   | |
| int | PutFullData (const std::string &tag, const void *buffer, const long long int length) | 
| Send data.   | |
| int | PutFullString (const JTag &tag, const std::string &buffer) | 
| Send string.   | |
| int | PutFullString (const std::string &tag, const std::string &buffer) | 
| Send string.   | |
| int | Connected () | 
| Send version.   | |
| int | WaitHead (JPrefix &prefix) | 
| Wait for header.   | |
| int | WaitHead (std::string &tag, long long int &length) | 
| Wait for header.   | |
| int | CheckHead (JPrefix &prefix, JTimeval timeout=JTimeval::min()) | 
| Check for header, without waiting.   | |
| int | CheckHead (std::string &tag, long long int &length, const int timeout_us=0) | 
| Check for header, without waiting.   | |
| int | GetFullData (void *buffer, long long int length) | 
| Receive data.   | |
| int | GetFullString (std::string &buffer) | 
| Receive string.   | |
| int | configure () | 
| Configure socket (factory reset).   | |
| int | read (char *buffer, const int length) override | 
| Read data from socket.   | |
| int | write (const char *buffer, const int length) override | 
| Write data to socket.   | |
| void | setNonBlocking (const bool on) | 
| Set non-blocking of I/O.   | |
| bool | getNonBlocking () const | 
| Get non-blocking of I/O.   | |
| void | setKeepIdle (const int t_s) | 
| Set the TCP idle time.   | |
| void | setKeepCnt (const int count) | 
| Set the TCP idle count.   | |
| void | setKeepIntvl (const int t_s) | 
| Set the TCP interval time.   | |
| void | setTcpNoDelay (const bool on) | 
| Set TCP no-delay.   | |
| bool | getTcpNoDelay () const | 
| Get TCP no-delay.   | |
| void | accept (const int server) | 
| Accept connection from a server.   | |
| void | connect (const int port) | 
| Connect to port on local host.   | |
| void | connect (const JHostname &hostname) | 
| Connect to port on specified host.   | |
| void | connect (const std::string &hostname, const int port) | 
| Connect to port on specified host.   | |
| void | connect (const int ip_number, const int port) | 
| Connect to port on specified host.   | |
| int | shutdown () | 
| Shut down socket.   | |
| void | setKeepAlive (const bool on) | 
| Set keep alive of socket.   | |
| bool | getKeepAlive () const | 
| Get keep alive of socket.   | |
| void | setReuseAddress (const bool on) | 
| Set reuse address.   | |
| bool | getReuseAddress () const | 
| Get reuse address.   | |
| void | setReceiveBufferSize (const int size) | 
| Set receive buffer size.   | |
| int | getReceiveBufferSize () const | 
| Set receive buffer size.   | |
| void | setSendBufferSize (const int size) | 
| Set send buffer size.   | |
| int | getSendBufferSize () const | 
| Get send buffer size.   | |
| int | close () | 
| Close file.   | |
| bool | in_avail (JTimeval timeout=JTimeval::min()) const | 
| Check availability of input.   | |
| bool | out_avail (JTimeval timeout=JTimeval::min()) const | 
| Check availability of output.   | |
| virtual bool | good () const | 
| Check status.   | |
| virtual bool | fail () const | 
| Check status.   | |
| virtual bool | bad () const | 
| Check status.   | |
| virtual bool | eof () const | 
| Check end of file.   | |
| bool | less (const JAbstractFile &file) const | 
| Less than operation.   | |
| int | getFileDescriptor () const | 
| Get file descriptor.   | |
| void | setFileDescriptor (const int file) | 
| Set file descriptor.   | |
| bool | is_open () const | 
| Get open status.   | |
| const sockaddr * | getSockaddr () const | 
| Get sockaddr.   | |
| sockaddr * | getSockaddr () | 
| Get sockaddr.   | |
| int | getFamily () const | 
| Get family.   | |
| void | setFamily (const int family) | 
| Set family.   | |
| std::string | getHostname () const | 
| Get host name.   | |
| int | getIPnumber () const | 
| Get IP number.   | |
| void | setIPnumber (const int ip_number) | 
| Set IP number.   | |
| void | setIPnumber () | 
| Set any IP number.   | |
| int | getPort () const | 
| Get port number.   | |
| void | setPort (const int port) | 
| Set port number.   | |
Static Public Member Functions | |
| static bool | maybe_special (const JTag &tag) | 
| Check special ControlHost tags.   | |
| static bool | is_valid (const char c) | 
| Check validity of subscription specifier.   | |
| static int | WhereIs (const std::string &host_name, const std::string &nick_name, std::string &answer) | 
| Locate ControlHost client(s).   | |
| static const int | getDefaultBufferSize () | 
| Default socket buffer size to be used on this system.   | |
| static int | sizeOf () | 
| Get size of object.   | |
| static void | Throw (const bool option) | 
| Enable/disable throw option.   | |
| static int | Throw (const JException_t &error, const int value=-1) | 
| Throw exception or return error.   | |
Static Public Attributes | |
| static const int | FILE_CLOSED = -1 | 
Protected Member Functions | |
| JControlHost () | |
| Default constructor.   | |
| template<class T > | |
| void | setOption (const int level, const int option, const T value) | 
| Set socket option.   | |
| template<class T > | |
| T | getOption (const int level, const int option) const | 
| Get socket option.   | |
Protected Attributes | |
| int | fileDescriptor | 
Static Protected Attributes | |
| static bool | do_throw | 
| throw option   | |
Private Member Functions | |
| JControlHost (const JControlHost &) | |
| JControlHost (JControlHost &&) | |
| JControlHost & | operator= (const JControlHost &) | 
| JControlHost & | operator= (JControlHost &&) | 
Private Attributes | |
| JPrefix | prefix | 
| int | result | 
ControlHost class.
Definition at line 248 of file JControlHost.hh.
      
  | 
  inlineprotected | 
Default constructor.
Definition at line 256 of file JControlHost.hh.
      
  | 
  inline | 
Constructor.
| server | host name and optional port number | 
Definition at line 294 of file JControlHost.hh.
      
  | 
  inline | 
      
  | 
  inline | 
      
  | 
  inline | 
Constructor.
| socket | socket | 
Definition at line 340 of file JControlHost.hh.
      
  | 
  inline | 
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  inlinestatic | 
Check special ControlHost tags.
| tag | tag | 
Definition at line 269 of file JControlHost.hh.
      
  | 
  inlinestatic | 
Check validity of subscription specifier.
| c | subscription specifier | 
Definition at line 281 of file JControlHost.hh.
      
  | 
  inline | 
Subscribe to single tag.
| subscription | subscription | 
Definition at line 360 of file JControlHost.hh.
      
  | 
  inline | 
Subscribe to list of tags.
| subscription | subscription | 
Definition at line 372 of file JControlHost.hh.
      
  | 
  inline | 
Identify.
| nick_name | nick name | 
Definition at line 384 of file JControlHost.hh.
      
  | 
  inline | 
Tell server to send next message.
Definition at line 395 of file JControlHost.hh.
      
  | 
  inline | 
Tell server to send messages forever.
Definition at line 406 of file JControlHost.hh.
      
  | 
  inline | 
Send data.
| tag | tag | 
| buffer | data | 
| length | number of bytes | 
Definition at line 420 of file JControlHost.hh.
      
  | 
  inline | 
Send data.
| tag | tag | 
| buffer | data | 
| length | number of bytes | 
Definition at line 448 of file JControlHost.hh.
      
  | 
  inline | 
Send string.
| tag | tag | 
| buffer | data | 
Definition at line 469 of file JControlHost.hh.
      
  | 
  inline | 
Send string.
| tag | tag | 
| buffer | data | 
Definition at line 483 of file JControlHost.hh.
      
  | 
  inline | 
Send version.
Definition at line 495 of file JControlHost.hh.
      
  | 
  inline | 
Wait for header.
| prefix | prefix | 
Definition at line 507 of file JControlHost.hh.
      
  | 
  inline | 
Wait for header.
| tag | tag | 
| length | number of bytes | 
Definition at line 530 of file JControlHost.hh.
      
  | 
  inline | 
Check for header, without waiting.
| prefix | prefix | 
| timeout | timeout | 
Definition at line 550 of file JControlHost.hh.
      
  | 
  inline | 
Check for header, without waiting.
| tag | tag | 
| length | number of bytes | 
| timeout_us | timeout [us] | 
Definition at line 579 of file JControlHost.hh.
      
  | 
  inline | 
Receive data.
| buffer | data | 
| length | number of bytes | 
Definition at line 599 of file JControlHost.hh.
      
  | 
  inline | 
Receive string.
| buffer | data | 
Definition at line 619 of file JControlHost.hh.
      
  | 
  inlinestatic | 
Locate ControlHost client(s).
| host_name | host name | 
| nick_name | nick name | 
| answer | list of host names | 
Definition at line 635 of file JControlHost.hh.
      
  | 
  inline | 
Configure socket (factory reset).
Definition at line 666 of file JControlHost.hh.
      
  | 
  private | 
      
  | 
  private | 
      
  | 
  inlineoverridevirtualinherited | 
Read data from socket.
| buffer | buffer | 
| length | number of bytes to read | 
Reimplemented from JNET::JSocket.
Definition at line 52 of file JSocketBlocking.hh.
      
  | 
  inlineoverridevirtualinherited | 
Write data to socket.
| buffer | buffer | 
| length | number of bytes to write | 
Reimplemented from JNET::JSocket.
Definition at line 80 of file JSocketBlocking.hh.
      
  | 
  inlineinherited | 
Set non-blocking of I/O.
| on | true to enable non-blocking; false to disable | 
Definition at line 56 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Get non-blocking of I/O.
Definition at line 80 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Set the TCP idle time.
| t_s | time [s] | 
Definition at line 98 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set TCP no-delay.
| on | true to set TCP no-delay; false to disable | 
Definition at line 131 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Get TCP no-delay.
Definition at line 142 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Accept connection from a server.
| server | file descriptor of TCP server socket | 
Definition at line 153 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on local host.
| port | port number | 
Definition at line 166 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| hostname | host name | 
Definition at line 177 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| hostname | host name | 
| port | port number | 
Definition at line 189 of file JTCPSocket.hh.
      
  | 
  inlineinherited | 
Connect to port on specified host.
| ip_number | IP number | 
| port | port number | 
Definition at line 201 of file JTCPSocket.hh.
      
  | 
  inlinestaticinherited | 
Default socket buffer size to be used on this system.
Definition at line 75 of file JSocket.hh.
      
  | 
  inlineinherited | 
Shut down socket.
Definition at line 89 of file JSocket.hh.
      
  | 
  inlineinherited | 
Set keep alive of socket.
| on | true to enable keep alive; false to disable | 
Definition at line 104 of file JSocket.hh.
      
  | 
  inlineinherited | 
Get keep alive of socket.
Definition at line 115 of file JSocket.hh.
      
  | 
  inlineinherited | 
Set reuse address.
| on | true to enable reuse address; false to disable | 
Definition at line 126 of file JSocket.hh.
      
  | 
  inlineinherited | 
Get reuse address.
Definition at line 137 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Set receive buffer size.
Definition at line 159 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineprotectedinherited | 
Set socket option.
| level | level | 
| option | option | 
| value | value | 
Definition at line 274 of file JSocket.hh.
      
  | 
  inlineprotectedinherited | 
Get socket option.
| level | level | 
| option | option | 
Definition at line 292 of file JSocket.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlinevirtualinherited | 
      
  | 
  inlineinherited | 
Less than operation.
| file | JAbstractFile to be compared | 
Definition at line 64 of file JAbstractFile.hh.
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
      
  | 
  inlineinherited | 
Get open status.
Definition at line 95 of file JAbstractFile.hh.
      
  | 
  inlineinherited | 
Get sockaddr.
Definition at line 44 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Get sockaddr.
Definition at line 55 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Get family.
Definition at line 66 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Set family.
| family | family | 
Definition at line 77 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Get host name.
Definition at line 88 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Get IP number.
Definition at line 99 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Set IP number.
| ip_number | IP number | 
Definition at line 110 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Set any IP number.
Definition at line 119 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Get port number.
Definition at line 130 of file JSocketAddress.hh.
      
  | 
  inlineinherited | 
Set port number.
| port | port number | 
Definition at line 141 of file JSocketAddress.hh.
      
  | 
  inlinestaticinherited | 
Get size of object.
Definition at line 155 of file JSocketAddress.hh.
      
  | 
  inlinestaticinherited | 
      
  | 
  inlinestaticinherited | 
      
  | 
  mutableprivate | 
Definition at line 686 of file JControlHost.hh.
      
  | 
  staticinherited | 
Definition at line 27 of file JAbstractFile.hh.
      
  | 
  protectedinherited | 
Definition at line 102 of file JAbstractFile.hh.
      
  | 
  staticprotectedinherited |