ACE VERSION: 5.3.? I think
HOST MACHINE and OPERATING SYSTEM: PC AMD Athlon, Windows 2000
If on Windows based OS's, which version of WINSOCK do you
use?: ? where can I find this information?
TARGET MACHINE and OPERATING SYSTEM, if different from HOST:
COMPILER NAME AND VERSION (AND PATCHLEVEL): MVC++ 6.0 compile with
the option /LINK50COMPAT
CONTENTS OF $ACE_ROOT/ace/config.h:
#define ACE_HAS_WINNT4 0
CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless
this isn't used in this case, e.g., with Microsoft Visual C++): not use
Unable to know what type of event has been dispatch which make a
error when I try to use a ACE_Semaphore when the Inputevent handler don't
have release it.
[What example failed? What module failed to compile?]
DOES THE PROBLEM AFFECT:
EXECUTION and OTHER
my applicationis affected is affected on it execution : it
blocked, but it don't produce directly an error.
I have a server and a client which use ACE in order to established a
communication with Socket ( I use SOCK_Stream).
In order to handle events I use a Reactor, a AcceptHandler and two
InputHandlers, one for the server, the other for the client.
But I have made a structure containing a semaphore in order to share data
between my Input handler and the server (or the client respectively) in
order to get back the data receive by the handler.
The problem is that in the server (resp. in the client) I don't know
which type of event has been dispatch by the HandleEvents function when
one is dispatch, so I am blocked on the semaphore when this is not the
right event (input one) which occurs to happen.
My goal is to make a client and a server which communicate with ACE in
order to make the client send a set of data contained in a structure to
the server and that's the server could reply something, as "ok, I receive
I must say that my source code must be as mcuh C compatible as posible.
The implementation of my server consist in a initialisation of different
structure, the waiting of a connection with a separate handleEvents(
that's another obscure point : I must decouple the accepting and the
Once my client is connected with the server, the last wait for data with
another call to HandleEvents(maxwaittime) in a non-blocking way.
When I have a event which have been dispatch, I try to acquire the
semaphore of my shared structure between the server and the
inputhandler, and, of course, when it was not a input event, it makes my
code blocking in that sens that the semaphore isn't blocking but I can't
try to make another HandleEvents or to send data if the reason why the
semaphore haven't successfully return should be that the input handler
haven't had the time to fulfill the structure and release my semaphore.
I don't know how to do in order to discriminize the type of event that
have occured or to get back the data that my input handler have received
in an other way than with a semaphore.
Could you help me please?