Solved

CSockets from a beginner

Posted on 2003-11-17
12
224 Views
Last Modified: 2013-11-20
I would like to check if there are other copies of an app (from me) running on other PC's in a network.
I have never used CSockets but I think they could be a way to go.

So.
Can an app on PC1 check if PC2 is running the same app via a CSocket.
Does this require any installed on the server to function.
What happens if for example the server is running novell.
Would firewalls on the PC's block communication.
And finally how rapid would the response be (assuming the app can respond immediately on reception of the query)
0
Comment
Question by:AndyAinscow
  • 6
  • 6
12 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9762843
Yes, you can use CSocket

>> Would firewalls on the PC's block communication
If the port that you are usiing for the communication is blocked in the firewall, will block the communication.

What about DCOM and RPC?
I'm not familiar in that, guess that also will work

Rosh :)
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9763039
'If the port that you are usiing for the communication is blocked in the firewall, will block the communication'
Oh Dear.  Not what I want but I suspected that could be the case.  Can one detect if a firewall is installed and not letting the connection be made?  At least then I could 'force' the user to modify the firewall settings.
Do you know about the speed?

'What about DCOM and RPC?
I'm not familiar in that'
I also know little about these.

Maybe more explanation,
I want to be able to limit the number of users at any one time using the app.  Licencing eg max 3 concurrent users.
I have thought of keeping a file on the server which will keep details of each user as they login and remove them as they close the app.  I can also think of ways around this strategy so I am investigating other possible ways.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9763076
>> I have thought of keeping a file on the server which will keep details of each user as they login and remove them as they close the app

Yes, You can keep that user info in Server memory itself- in a structure array or something like that.  

>>   At least then I could 'force' the user to modify the firewall settings.
the port for the communication should be a variable, so user can chage the socket port. If any other application is using the same port user can change that thru a settings program.

Rosh :)
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9763168
>>   At least then I could 'force' the user to modify the firewall settings.
the port for the communication should be a variable, so user can chage the socket port. If any other application is using the same port user can change that thru a settings program.


OK. PC1 opens a socket and broadcasts "hello, Ive started"
How do I detect that a lack of response is that no other PC on the network is running my app rather than a firewall has gone STOP.  ALERT.  INTRUDER.  ***** OFF
Absence of evidence is not evidence of absence!
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9763193
All the messages are passed thru the Server.

Clients will send messages to the Server, Server have the list of all clients and will send the message to other clients that are in the Server list.

This Server list contain only the successful logged in clients

Rosh :)
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9763231
So does a 'master' program need to be installed and running on the server?

Do you have an example?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 23

Accepted Solution

by:
Roshan Davis earned 250 total points
ID: 9763441
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9763768
I'll have a look later or tomorrow.  No more time now.
Thanks.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9763804
Okay
Rosh :)
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9770848
Hi Roshmon
I've downloaded the netmsg-fxx.  It's rather complex, I'll need a little time to investigate it further and see if it is usefull.
I'll get back asap.
0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9770915
Okay, All the Best
Rosh :)
0
 
LVL 44

Author Comment

by:AndyAinscow
ID: 9795529
Hi Rosh,
I'm still not convinced this is really what I require.  It's a possibility but is the most appropriate for my situation.
Having something running on a server really restricts it to windows based server environments.

Thanks for your comments and the link.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
iSeries FTP Exit Program 8 114
Generic progress indicator 6 110
FizzBuzz challenge 9 73
Problem to open Excel file 15 44
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now