• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

How to count the number of client machines connected to server machine in java using socket communic

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Hi All,

Iam working on stand alone application in java using socket communication,
Almost 200 cleint machines will transfer files to server system . how to find the number of client machines is connected with server. please advise me , Iam new to netwroking concept.
please correct me if I am wrong.
Thanks in Advance.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Riyas Hameed wrote:



Hi All,

Iam working on stand alone application in java using socket communication,
Almost 200 cleint machines will transfer files to server system . how to find the number of client machines is connected with server. please advise me , Iam new to netwroking concept.
please correct me if I am wrong.
Thanks in Advance.


Are you asking for machines connected to server at that instant or total no. of connections after server started ?
 
Riyas Hameed
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

chenna kesava.ich wrote:

Riyas Hameed wrote:



Hi All,

Iam working on stand alone application in java using socket communication,
Almost 200 cleint machines will transfer files to server system . how to find the number of client machines is connected with server. please advise me , Iam new to netwroking concept.
please correct me if I am wrong.
Thanks in Advance.


Are you asking for machines connected to server at that instant or total no. of connections after server started ?



Thanks for your response .
for example my client program have installed in 100 machines , all these client machines are connected to server , due to some problem some of the client machines are not connected with server while running , how do you I know what are the client machines not connected with server also I want to count the number of machines connected with server .
 
Marshal
Posts: 26697
81
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Riyas, please don't quote your own posts. That isn't what the quoting feature is for and it just makes it confusing for everybody else. I've edited your posts to unquote them.

As for your question (or at least one version of it): Use an int variable. When a client connects to your server, increment that variable. When a client disconnects, decrement it.
 
Riyas Hameed
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Paul Clapham wrote:Riyas, please don't quote your own posts. That isn't what the quoting feature is for and it just makes it confusing for everybody else. I've edited your posts to unquote them. As for your question (or at least one version of it): Use an int variable. When a client connects to your server, increment that variable. When a client disconnects, decrement it.





Thanks Paul, here after it wont happen
 
I've read about this kind of thing at the checkout counter. That's where I met this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic