ripcclient.lib
ripcserver.lib
RIPC supports local and remote sessions. Remote sessions
created by RIPCClientFactory
class
establish connection with the server through TCP/IP stream socket.
Server process should be started before clients.
In this case primitives at local computer servers as stubs and redirect
requests to the server.
This mode is useful to provide synchronization and communication
between several processes at the same or different computers.
Local sessions are created by RIPCServerFactory
class. Them are useful to provide synchronization of threads within the same
process (if you want to use more sophisticated synchronization primitives than
standard synchronization facilities provided by OS).
The single local session can be shared by all threads.
No server process should be started in this case.
inc
directory.
Libraries are located in lib
directory. Version of RIPC for windows is
provided with binaries of these librarier and server built by Visual C++ comiler.
At all other system you will have to build these libraries yourself.
Change directory to src
and exceute make
(for Visual
C++ RIPC provides make.bat
file which invokes MS nmake
utility
for makefile.mvc
). By default static version of librarier are built. To
produce dynamically linked librariers, edit makefile and assign set
GENERATE_DLL=1
. In case of using DLL libraries do not forget to include them in
PATH
(at Windows) or in LD_LIBRARY_PATH
(at Unix).
Server executable file will be placed in bin
directory.Server can be started by the following command:
RIPCServer PORTHere
PORT
is any free IP port at your system. Server is starts
interactive dialog, allowing you the inspect current state of the server
(info
command) or terminate the server (exit
command).
It is possible to run server in debug mode. Debug level can be specified using
-debug
option:
0
no debugging
1
trace all exceptions
2
trace session open/close requests
3
trace all requests
Default debug level is 1.
It is possible to start server in daemon mode, without interactive dialog.
It can be done with
I will provide e-mail support and help you with development applciation using RIPC package.
Look for new version at my homepage |
E-Mail me about bugs and problems
RIPCServer -d 6000
will start server process in the background. To send commands to the server started in
daemon mode you can use RIPCServerMonitor
:
Usage:
RIPCServerMonitor HOSTNAME PORT [command]
Commands:
SHUTDOWN shutdown server
INFO dump information about server status
If command is not specified in command line, server monitor starts interactive dialog.
In this dialog, except SHTDOWN and INFO commands it also supports EXIT and HELP commands.
EXIT command is used to close dialog, HELP shows list of available commands.
Now it is possible to start client processes using RIPC library.
Client should create RIPC sessions using
RIPCClientFactory.create(char const* address, int port)
method.
Here address
is address of the host where server is started and
port
is port listening by the server. Before exit client
should close session. Below is example of using RIPC library:
#inlcude "ripc.h"
void testRIPC(char const* hostname, int port)
{
RIPCFactory* factory = RIPCClientFactory::getInstance();
RIPCSession* session = factory->create(host, port);
RIPCMutex* mutex = session->createMutex("my-mutex", false);
mutex->lock();
// do something
mutex->unlock();
delete session;
}
Distribution terms
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the Software), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: