Re: Help Needed on ActiveX EXE winsock worker
- From: mailserv@xxxxxxxxx (J)
- Date: 27 Apr 2005 21:00:04 -0700
"Schmidt" <sss@xxxxxxxxx> wrote in message news:<eJHHyFmSFHA.1404@xxxxxxxxxxxxxxxxxxxx>...
>
> I've looked at the Class you mentioned - it's not possible with a few lines
> of code, to make this work in a multithreaded AX-Exe-Environment.
> But if you want to make a stable, multithreaded server wich is getting jobs
> over different client-sockets, your workers don't have to contain the
> transport-layer (the sockets). Simply let the listening serversocket and all
> the clientsockets in the main-thread, isolate the jobs from the incoming
> socket-requests, pass the job-data to your worker-threads, async start the
> jobs inside the workers and pass the results back to the main-thread to send
> them back over the right client-socket.
>
> Olaf
Thanks again for your reply.
Well, actually the app that I am doing is kind of message distributor,
with a server listening for connection (could be 10, 20, or even
more). Whenever there is a message received from one of the client
app, this server app is then resposible to distribute the message to
the respective recepient modules (could be 1, 2 or more).
My current design is to have a buffer storing incoming message, and a
timer where the distributing of the message take place. In the timer
event, the server would then get the message out from the buffer and
send it to respective client modules, without any heavy processing on
the message. In this case the sending of message to the recepient
module is in sequence, making it possibly delay if there is many
receipient modules for the particular message. The problem would
become more obvious if I were to put in the message acknowledgement,
timeout and resend (this is needed to solve the incapability of the
server app to detect the network problem at client).
So what I can think of to oversome this possible problem is to create
a worker thread which the server can just simply pass the message to
it without worrying about the message acknowledgement etc. So each
worker thread should then have their own buffer to store the incoming
message, and send it out one by one.
By this, I think the idea that you have suggested would not applicable
here. Any advice?
J.
.
- Follow-Ups:
- Re: Help Needed on ActiveX EXE winsock worker
- From: Schmidt
- Re: Help Needed on ActiveX EXE winsock worker
- References:
- Help Needed on ActiveX EXE winsock worker
- From: J
- Re: Help Needed on ActiveX EXE winsock worker
- From: Schmidt
- Re: Help Needed on ActiveX EXE winsock worker
- From: J
- Re: Help Needed on ActiveX EXE winsock worker
- From: Schmidt
- Help Needed on ActiveX EXE winsock worker
- Prev by Date: Hide activeX exe name in Task Manager app pane
- Next by Date: Re: Help Needed on ActiveX EXE winsock worker
- Previous by thread: Re: Help Needed on ActiveX EXE winsock worker
- Next by thread: Re: Help Needed on ActiveX EXE winsock worker
- Index(es):
Relevant Pages
|
Loading