Results 1 to 3 of 3

Thread: winsock chat server help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Exclamation winsock chat server help

    in winsock chat server command6 button am trying to do this

    Private Sub Command6_Click()
    Dim num As Integer
    For num = 0 To List1.ListCount - 1
    wsServer(CInt(lstUsers.List(num))).SendData "COMMAND_KICK"

    DoEvents
    Next num
    End Sub


    then COMMAND_KICK value sends out disconnect command to client side disconnecting client

    when i click the command6 it disconnects all clients in list1 i only want to disconnect selected list1 users please help

  2. #2
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: winsock chat server help

    You don't need to send disconnect to client. Just close the client's socket from the server. This will cause the client's socket Close event to fire and in that event you can MsgBox client that he has been booted and also clear out the chat panel of the client. If you would read the code I gave you, you would see that and you wouldn't need to even have posted this thread.


    Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    137

    Re: winsock chat server help

    jmsrickland sir i have your source i only request 1 thing in your source add 1 chatroom in listbox when double clicked the chatroom on list1 then user changed room please

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width