• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Application Socket Sharing

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've build an application that connect to a server. The connection works fine and there are no much problems with it.
When I'm start the application again, when the first instance is still running, I get the problem that the program connect again to the server and the server registered the program as a new connection.
All data which is send from the server to this application arrived at the first instance. Is there a possibility to check if there is still an application (my programm in the first instance) is running on the client-site, so that I can stop the client starting before it can connect the server?
Regards
Lars
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one Possible solutions is:
To record the IP of all clients that connected to the server.
I am assuming that NO more than 1 client can run on a single machine as per Ur requirement.
Whenever a client connects to the server,
Server should check for the client in his database.
If there is an client from the same machine(same IP), then
close the socket, so that if the client-1 socket tries writing on this now 'closed' socket he gets an IOException.
Hope that helps
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic