IlsTcpLoopback
 
IlsTcpLoopback
Category 
Communication layer class
Inheritance Path 
IlsTcpLoopback
Description 
This class provides a way to execute application code in the main thread in order to synchronize all the critical code such as access to the model. The different ways (synchronous or asynchronous) to communicate with the main thread are explained below:
Library 
<mvtcp>
Header File 
#include <ilserver/mvtcp/loopback.h>
Synopsis 
class IlsTcpLoopback {
public :
static void Initialize();
static void InvokeNow(IlsRunnable & runnable);
static IlsBoolean InvokeNow(IlsRunnable & runnable,
IlsTime to);
static void InvokeLater(IlsRunnable & runnable);
};
Member Functions 
[static] void Initialize();
Before you can call any of the methods InvokeNow or InvokeLater, you must initialize your IlsTcpLoopback instance using this static member function.
[static] void InvokeNow(IlsRunnable & runnable);
This static member function invokes the run member function of the runnable argument in the main thread and waits for the end of execution. The runnable parameter is the runnable to execute.
[static] IlsBoolean InvokeNow(IlsRunnable & runnable, IlsTime to);
This static member function invokes the run method member of the runnable argument in the main thread and waits for the end of execution with a timeout. If the main thread executes the run method before the end of timeout, the function returns IlsTrue. When the timeout is elapsed, the run method can no longer be called and the method returns IlsFalse. The runnable parameter is the runnable to execute. The parameter to is the timeout.
[static] void InvokeLater(IlsRunnable & runnable);
This static member function posts the invokation of the run method of the runnable argument to the main thread and does not wait for the end of execution. The runnable parameter is the runnable to execute.

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.