S
SH
I wish to create a program (really a Windows Service) that sits and
waits for a client PC to communicate with it, but I can't come up with a
good method of doing so.
I want to have a service running on a server, waiting for clients to
send it commands. The service would then do something based on the
command and send the information back to the client. This is exactly
what any database does. What is the best method for doing this?
The only method I can come up with, is that when the client wishes to
communicate with the service it would write a file on the server. The
service would check for the existence of that file every X number of
seconds. Then the service would do it's thing and write back another
file with the results. The client would constantly check every X number
of seconds for the existence of the results file and then read the file.
I, of course, don't like this solution. It's not elegant, it avoids the
whole point, and I can see timing problems throughout.
Is there another way for a service to just "listen" for a stream of data
directly without a file intermediary? What command just "listens"? And
how do you receive a stream of data out of thin air?
Thanks for any ideas.
waits for a client PC to communicate with it, but I can't come up with a
good method of doing so.
I want to have a service running on a server, waiting for clients to
send it commands. The service would then do something based on the
command and send the information back to the client. This is exactly
what any database does. What is the best method for doing this?
The only method I can come up with, is that when the client wishes to
communicate with the service it would write a file on the server. The
service would check for the existence of that file every X number of
seconds. Then the service would do it's thing and write back another
file with the results. The client would constantly check every X number
of seconds for the existence of the results file and then read the file.
I, of course, don't like this solution. It's not elegant, it avoids the
whole point, and I can see timing problems throughout.
Is there another way for a service to just "listen" for a stream of data
directly without a file intermediary? What command just "listens"? And
how do you receive a stream of data out of thin air?
Thanks for any ideas.