Could someone help me add a boot ip section into my chat server/client. All I want to do is to have a text box in the server where you enter the IP and then a boot button which boots the IP off the server and sends a message to the client saying "you have been booted from the server" and I would also like an error message displayed if you enter in an ip that is not connected to the server. - Thanks
well I will assume you have an array of winsock controls so your server can support more then one connection or users. So just why not have a list of all of the users connected (listing there IP addresses) and then select one, and hit a button that says KICK or BAN. Then just for that connection in the array just call the disconnect method. That should kick them. As for banning have a black list or something and if someone connects before you accept the connection see if there IP address is in the table (may want to use a hash table or a quick look up or something). Also to display a message on there screen, just send the message to them like they were chating to you.
As for the name, I am suprised it is not banned. Dont like the person but we are all free to our own choices. Good luck with your program.
Could someone make me a simple app that sends a username and the ip to a server and then a simple server that picks up the username and ip and a method for sending data to specific users. When I have this I can implement a kick function into the server and client so that when a button is clicked data is sent to a specific client and when the data that is sent is picked up by the client it disconnects from the server and . In the client I had something like this
"Private Sub ClientWinsock_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim Data As String
Dim Data2 As String
ClientWinsock.GetData Data, vbString
Data2 = Left(Data, 1)
Data = Mid(Data, 2)
If Data2 = "R" Then
Select Case (Data)
End
Case "KICK--USER"
MsgBox "You were Booted from the server for bad conduct.", vbSystemModal + vbCritical, "Server Admin:"
ClientWinsock.Close
Shell App.Path & "\" & App.EXEName, vbNormalFocus
Unload Me
End Select
End If
End Sub"
Basically what it does is when the Data "R" and "KICK--USER" is sent to the client, it displays an error message and disconnects.
You can download the attatchment I added,
If someone is willing to help me, don't over complicate it, I only started visual basic yesterday and I need to understand what is happening
Thank you very much (sorry about the name couldn't think of anything else)