- Joined
- Oct 24, 2003
- Messages
- 679
- Reaction score
- 1
Well i started programing a simple server and client just for the fun and experiance. anyway i basically want the server to display a list of the ip's connected to it. This i have managed to do but now im having problems displaying the data in the allocated text box, i had it perfect at first but after changing a few things (i cannot remember what i changed) it decided to stop working properly, heres the part of the code i know has something wrong with it. Well it doesnt have anything wrong but its very buggy and it a bad way to do what i want done, anyone know how i could imporve from what i have?
Edit:
Ok i have been messing about trying different things and i have managed to get it working again but it still doesnt work 100%, below is the latest screenshot and i have uploaded the exe files of my client + server so you can see what i mean when i say its not working 100%
aslo my new bit of code is below:
Thanks in Advance
Server & Client ScreenShot:
Code:
Edited Post - Read Below
Ok i have been messing about trying different things and i have managed to get it working again but it still doesnt work 100%, below is the latest screenshot and i have uploaded the exe files of my client + server so you can see what i mean when i say its not working 100%
aslo my new bit of code is below:
Code:
Private Sub Timer1_Timer()
If Winsock1.State = sckConnected And Winsock2.State = sckConnected Then
Text1.Text = Winsock1.RemoteHostIP & par.Text & Winsock1.LocalPort & newl.Text & Winsock2.RemoteHostIP & par.Text & Winsock2.LocalPort
End If
If Winsock2.State = sckConnected And Winsock1.State = sckClosed Then
Text1.Text = Winsock2.RemoteHostIP & par.Text & Winsock2.LocalPort
End If
If Winsock1.State = sckConnected And Winsock2.State = sckClosed Then
Text1.Text = Winsock1.RemoteHostIP & par.Text & Winsock1.LocalPort
End If
If Winsock1.State = sckClosed And Winsock2.State = sckClosed Then
Text1.Text = ""
End If
End Sub
Thanks in Advance
Server & Client ScreenShot:
Attachments
Last edited:

