Sending info to a remote application

R

Robert Dufour

Requirements are as follows.
1- There is a server application running named srvrApp. When an event occurs
in the srvrAPP on the server, say InfoRcvd occurs, it must send information
to a Winform application CltApp, that should be running on a remote machine,
and CltApp must be able to return some information to the srvrApp.

Because there may be many clients running I will have to determine to which
machine I want to send the Information from the server, so I have to find
out if a machine is up and running, I think a ping can do this, and if the
application is running on the remote machine and also if the remote
application is currently free.

Question 1- How do you determine if cltApp is running on a particular remote
machine?
Question 2- How can you determine if cltApp is already being used in a
session between the server and the client?

My suspicion is that I will have to work with remoting but I haven't found
any discusssions on something similar to what I described above. Any help
would be appreciated.

Bob
 
P

Phillip Ross Taylor

What I would do is this have the server listen on a given port (using
a winsock control) and when the clients are started they each use
winsock.connect to connect to the server.

Everytime the server gets another winsock connection it adds it to an
array / linkedlist of clients listening. These connections stay open
silently (there really isn't any overhead) and if a client drops or
the connection breaks the error handler removes that client from the
linked list.

And everytime the server gets new data it just iterates through the
collection or array, writing to each open socket.

That's pretty much it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top