ScriptModule
Public Slots | Public Member Functions | List of all members
RemoteCmd Class Reference

#include <NetworkInterface.h>

Inheritance diagram for RemoteCmd:
Inheritance graph
[legend]
Collaboration diagram for RemoteCmd:
Collaboration graph
[legend]

Public Slots

bool connect (const String &machine, int port)
 
bool connectTimeout (const String &machine, int port, int timeout)
 
bool send (const String &cmd)
 
bool receive (int timeout)
 
bool sendMsg (const String &msg)
 
bool receiveMsg (int timeout)
 
void disconnect ()
 
bool connected () const
 
String lastReceived () const
 

Public Member Functions

 RemoteCmd ()
 

Detailed Description

RemoteCmd allows user to send one sided commands to a remote host

You can use it in both Script Editor and scriptModule.

Constructor & Destructor Documentation

RemoteCmd::RemoteCmd ( )

Create a new RemoteCmd remote command object.

Member Function Documentation

bool RemoteCmd::connect ( const String &  machine,
int  port 
)
slot

Connect to a remote machine.

Parameters
machineString Machine name
portPort number
Returns
Succes/Failure of operation
bool RemoteCmd::connected ( ) const
slot

Retrieve connection status

Returns
Status
bool RemoteCmd::connectTimeout ( const String &  machine,
int  port,
int  timeout 
)
slot

Connect to a remote machine.

Parameters
machineString Machine name
portPort number
timeoutTimeout value
Returns
Succes/Failure of operation
void RemoteCmd::disconnect ( )
slot

Disconnect from remote machine.

String RemoteCmd::lastReceived ( ) const
slot

Retrieve last received response from server.

Returns
Response String
bool RemoteCmd::receive ( int  timeout)
slot

Query response from server.

Parameters
timeoutTime out value in milliseconds. -1 for infinity.
Returns
Success/Failure of operation
bool RemoteCmd::receiveMsg ( int  timeout)
slot

Query a packaged response from server.

Parameters
timeoutTime out value in milliseconds. -1 for infinity.
Returns
Success/Failure of operation
bool RemoteCmd::send ( const String &  cmd)
slot

Send a command to remote machine.

Parameters
cmdString command
Returns
Success/Failure of operation
bool RemoteCmd::sendMsg ( const String &  msg)
slot

Send a packaged message to remote machine.

Parameters
msgString message
Returns
Success/Failure of operation

The documentation for this class was generated from the following file: