i've already done if client can disconnect from server...............
i mean only the server can be kill other client............ But the client can't kill other client! (Like in IRC if you have an sop or aop accsess, you can kill or ban other user)
thanks
Last edited by exliko; Sep 28th, 2006 at 02:27 AM.
You must do it via server, for example you (Client A) must msg to server '/kick CLIENTB', and server must recognize this command, and automatically kicks client B, via disconnect
What client A does is send the server a message, like "kick client B".
The server receives that message and interprets it.
This involves string manipulation and selective logic like Select Case.
The server also needs to maintain a list that stores which clint uses which socket.
Having done that, the server knows which socket connects to client B and closes that.
You shuld've looked at the link exliko provided in the first post...
Anyways...
The best person to make changes to the program is the person that made the program.... and that would be ME
I attached the updated Server program since that's the only one you need to make any changes.
What I did:
I added a popup menu.
I chagned the code that adds the users to the list so that it adds the socket Index to the ItemData of the list box, basically this line:
VB Code:
lstUsers.ItemData(lstUsers.NewIndex) = Index
Then in the Disconnect menu, I just call the winsock event sub, which in turn disconnects the client, and removes the user from the list:
Re: [RESOLVED] Kill or Disconnect Client from Server
You are very welcome exliko.
I found your thread by chance, just because you type my username in the post it does not mean that I get a notification that someone mentioned me in one of the threads, I wish what would be possible.
Instead, next time you want the program maker to help you, you should PM (Private Message) that person and give a link to the thread you just made, so the person knows where to go to help you (if they are willing to help you, but that's their choice...).