Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Static Public Member Functions | Protected Member Functions
IlsIlvTcpMvProcess Class Reference

This class initializes a server or component process that uses Rogue Wave Server MvTCP as the communication layer and executes the Rogue Wave Views event loop. More...

#include <ilserver/mvtcp/tcpmvproc.h>

Inheritance diagram for IlsIlvTcpMvProcess:
IlsTcpMvProcess IlsMvProcess

Static Public Member Functions

static IlsBoolean Initialize (int &argc, char **argv, unsigned short listenPort=0)
 Use this static member function to initialize the Rogue Wave Server MvTCP communication layer. More...
 
- Static Public Member Functions inherited from IlsTcpMvProcess
static IlsBoolean Initialize (int &argc, char **argv, unsigned short listenPort=0)
 Use this static member function to initialize MvTCP, the Rogue Wave Server TCP/IP communication layer. More...
 
static unsigned short GetListenPort ()
 This static member function returns the port used to accept new connections. More...
 
static void HideSendingErrors (IlsBoolean b)
 This static member function should be called after Initialize(). More...
 
static void SetDefaultRecvBuffer (int size)
 Set the default size of the receive buffer used by the sockets. More...
 
static int GetDefaultRecvBuffer ()
 Get the default size of the receive buffer used by the sockets. More...
 
static void SetDefaultSendBuffer (int size)
 Set the default size of the send buffer used by the sockets. More...
 
static int GetDefaultSendBuffer ()
 Get the default size of the send buffer used by the sockets. More...
 
static IlsTimeGetTcpTimeout ()
 Get the default timeout for synchronous calls. More...
 
static void SetTcpTimeout (IlsTime *timeout)
 Set the default timeout for synchronous calls. More...
 
static void SetTcpNoDelay (IlsBoolean b=IlsTrue)
 Set the TCP_NO_DELAY option for sockets. More...
 
static IlsBoolean IsTcpNoDelay ()
 Check if socket layer has been initialized with the TCP_NO_DELAY option. More...
 
static IlsTcpdMappingGetMappings (IlsString const &hostName, int &size, unsigned short port=0, IlsTime *timeout=0)
 Returns all the mappings registered on a Rogue Wave Server logical mapper. More...
 
static int PingDaemon (IlsString const &hostName, unsigned short port=0, IlsTime *timeout=0)
 This static member function is used to know whether a Rogue Wave Server logical mapper is alive. More...
 
static void SetTrace (IlsBoolean b=IlsTrue)
 Set the trace mode for the MvTCP layer. More...
 
static IlsBoolean IsTraced ()
 Check if the trace mode for the MvTCP layer is enabled. More...
 
static IlsBoolean AddInput (IlsFD fd, IlsSocketCallback cb, IlsAny arg=0)
 Register external file descriptors with the Rogue Wave Server MvTCP main loop. More...
 
static IlsBoolean RemoveInput (IlsFD fd)
 Unregister an external file descriptor from the Rogue Wave Server MvTCP main loop. More...
 
static void ProcessFD (IlsFD fd)
 Call this static member function when you have registered MvTCP file descriptors with an external main loop and detected an event through the select() system call on this file descriptor. More...
 
static void SetCreateFDCallback (IlsSocketCallback cb, IlsAny arg=0)
 This static member function registers a callback that will be called each time a new MvTCP file descriptor must be registered with an external main loop. Call this function after having initialized the MvTCP layer using the Initialize function. More...
 
static void SetRemoveFDCallback (IlsSocketCallback cb, IlsAny arg=0)
 This static member function registers a callback that will be called each time MvTCP releases a file descriptor. If you have registered the MvTCP file descriptor passed to the callback with an external main loop, you must unregister it when the callback is called. More...
 
- Static Public Member Functions inherited from IlsMvProcess
static IlsMvProcessGetSingletonPtr ()
 Returns the single instance of IlsMvProcess that has been initialized or 0 if none has been initialized. More...
 
static IlsBoolean SetName (const IlsString &name)
 Assigns a name to the current process to enable distributed applications to connect to the process. More...
 
static IlsString GetName ()
 Returns the name assigned to the process or by default the null string.
 
static IlsMvEndPointGetEndPoint (const IlsString &procName, const IlsString &hostName, IlsBoolean isComp)
 Returns a pointer to the local end point of the connection established with the process procName on host hostName. More...
 
static IlsMvComponentGetComponent (const IlsString &serverName, const IlsString &hostName)
 Similar to the function GetEndPoint(), except that it explicitly looks for a component connected to the server named serverName on host hostName.
 
static IlsMvEndPointConnect (const IlsString &actorName, const IlsString &hostName, const IlsString &myIPAddr=IlsString::Null, IlsBoolean toServer=IlsTrue)
 Enables connection to the process procName running on the host hostName. More...
 
static int DoConnect ()
 Executes the connection to the server(s) specified in the command line using one of the -ilsc or -ilsconnect options. More...
 
static IlsBoolean DisconnectOnComError ()
 Returns the value of the disconnectOnError property. More...
 
static void SetDisconnectOnComError (IlsBoolean b)
 Sets the value of the disconnectOnError property.
 
static IlsBoolean Run (int nb=0, IlsTime *t=0)
 Iimplements the default event loop for dynamic-view based processes. More...
 
static IlsBoolean ProcessRequest (IlsTime *t)
 Calls the virtual function processRequest() on the IlsMvProcess singleton.
 
static void Stop ()
 Stops the Run() event loop.
 
static IlsBoolean Initialize (int &argc, char **argv)
 Initializes a linked Server process – that is, a process including both server and component(s). More...
 
static IlsBoolean IsInitialized ()
 Returns IlsTrue if the process has already been initialized or IlsFalse otherwise.
 

Protected Member Functions

virtual IlsBoolean localInitialize (int &argc, char **argv)
 Invoked by the member function initialize. More...
 
- Protected Member Functions inherited from IlsTcpMvProcess
 IlsTcpMvProcess (unsigned short &port)
 This protected constructor is called by the static member function Initialize or by the constructor of a subclass with the listen port as its argument. More...
 
virtual IlsTcpdMappinggetMappings (IlsString const &hostName, int &size, unsigned short port=0, IlsTime *timeout=0)
 You can override this virtual member function to define your own implementation, that is, to return a list of predefined mappings without connecting to a Rogue Wave Server logical mapper. More...
 
virtual unsigned short lookupProcess (const IlsString &procName, const IlsString &hostName)
 By default, this virtual member function request the logical mapper running on hostName to get the TCP port of the server process. More...
 
virtual void onError (const IlsString &msg, IlsSocketException *e=0, IlsBoolean sendingError=IlsFalse)
 Invoked by Rogue Wave Server each time an exception is trapped inside the MvTCP communication layer or each time an error occurs when the connection is manipulated. More...
 
virtual void onTcpError (const IlsString &msg)
 Is invoked by Rogue Wave Server when a low-level error occurs in the MvTCP communication layer. More...
 
virtual int pingDaemon (IlsString const &hostName, unsigned short port=0, IlsTime *timeout=0)
 You can override this virtual member function to define your own implementation. More...
 
- Protected Member Functions inherited from IlsMvProcess
virtual IlsBoolean initialize (int &argc, char **argv)
 Initializes an instance of IlsMvProcess. More...
 

Additional Inherited Members

- Public Member Functions inherited from IlsTcpMvProcess
virtual IlsBoolean processRequest (IlsTime *t)
 Called by the function IlsMvServer::Run() to execute a request issued by a component. More...
 
- Public Member Functions inherited from IlsMvProcess
 IlsMvProcess ()
 Constructor. More...
 
virtual ~IlsMvProcess ()
 The instance of IlsMvProcess is automatically destroyed by Rogue Wave Server when the process ends.
 
IlsMvEndPoint *const * getEndPoints (int &dim)
 Returns an array of all the end points created in the process. More...
 
virtual void beforeRequest ()
 Called by the subclass of IlsMvProcess before it a request received on the communication layer is processed. More...
 
virtual void afterRequest ()
 Called by the subclass of IlsMvProcess after a request received on the communication layer has been processed. More...
 

Detailed Description

This class initializes a server or component process that uses Rogue Wave Server MvTCP as the communication layer and executes the Rogue Wave Views event loop.

Library: mvtcp

On Windows® platforms, this class creates a new thread which selects the MvTCP file descriptors. When an event is detected on one of these file descriptors, the thread forwards a specific Windows message which will be handled by a specific Windows Proc. The main thread must run a standard Windows message loop.

On Windows platforms, this class may be used to interface any graphic product. On UNIX®, this class register MvTCP file descriptors with the Rogue Wave Views main loop.

See also
IlsTcpMvProcess.

Member Function Documentation

◆ Initialize()

static IlsBoolean IlsIlvTcpMvProcess::Initialize ( int &  argc,
char **  argv,
unsigned short  listenPort = 0 
)
static

Use this static member function to initialize the Rogue Wave Server MvTCP communication layer.

This process mixes the MvTCP main loop with the Rogue Wave Views main loop. The listenPort argument can be used to specify on which TCP port the process will listen for incoming messages.

◆ localInitialize()

virtual IlsBoolean IlsIlvTcpMvProcess::localInitialize ( int &  argc,
char **  argv 
)
protectedvirtual

Invoked by the member function initialize.

It takes the arguments of the command line as its parameters. It has an empty body but is overridden in subclasses of IlsMvProcess.

Reimplemented from IlsTcpMvProcess.