• Post Reply Bookmark Topic Watch Topic
  • New Topic

TCPServer with Connecte client list show to Client side.

 
Lalitkumar Solanki
Greenhorn
Posts: 12
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friend,

How to TCPServer with Connecte client list show to Client side.

Please give me more details and advance thank you.
 
Henry Wong
author
Sheriff
Posts: 22644
111
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In my opinion, the easiest option is to maintain the list yourself. Just add the client socket to the list when it is accepted, and remove the socket from the list when it is closed.

As for details on the client, all you will have is the socket info. If you want more than that, then your protocol will need some way to get the information from the client side application.

Henry
 
Lalitkumar Solanki
Greenhorn
Posts: 12
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Henry Wong for your replay ,

How to get list from client application  to connected client from server application ? any method or other ?

please give me more details.
 
Henry Wong
author
Sheriff
Posts: 22644
111
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lalitkumar Solanki wrote:
How to get list from client application  to connected client from server application ? any method or other ?


The same way that you would get any information from one host to another host -- you would need to send it.  After all, that is what the network socket is for. You need to design your communication protocol to send everything that is needed by all the applications; the data that is needed by the users *and* the control data that is needed by the applications handling the user's data too.

Henry
 
Lalitkumar Solanki
Greenhorn
Posts: 12
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Henry Wong,

please give one small example so i'm very clear.

Please and advance thank you HENRY.
 
Henry Wong
author
Sheriff
Posts: 22644
111
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

If you want an example of how to send and receive data, then there are lots and lots of examples on the internet for that.

If you want an example of a protocol that does something similar to what you want, well, I don't have anything similar. Additionally, it will not be minor, as generally, there are lots of edge cases that needs to be taken care of. This is why many opt for higher level frameworks that does the remote procedure calls.

Henry
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!