Dec 11th, 1999, 07:01 PM
Ok, Iming writeing a client/server thing. For some reason It only works on my computer. It a send someone else the server and try to connect over the internet it doesnt work.
Here is the basic connection part of the program:
CLIENT
Private Sub Command1_Click()
On Error GoTo error
'Close old connections
Winsock1.Close
' connect
Winsock1.Connect Text1.Text, 5678
Command1.Enabled = False 'disable connect command button
Command2.Enabled = True 'enable diconect command button
error:
Exit Sub
End Sub
SERVER
Private Sub Form_Load()
MakeProgramStealth
' here it listen for connection to port 5678
Winsock1.LocalPort = 5678
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
' it's accept connection when anything asks
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub
IF someone could find why this connects when both are on my computer and not over the internet I would greatly appreciate it.
Thanks
Here is the basic connection part of the program:
CLIENT
Private Sub Command1_Click()
On Error GoTo error
'Close old connections
Winsock1.Close
' connect
Winsock1.Connect Text1.Text, 5678
Command1.Enabled = False 'disable connect command button
Command2.Enabled = True 'enable diconect command button
error:
Exit Sub
End Sub
SERVER
Private Sub Form_Load()
MakeProgramStealth
' here it listen for connection to port 5678
Winsock1.LocalPort = 5678
Winsock1.Listen
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
' it's accept connection when anything asks
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub
IF someone could find why this connects when both are on my computer and not over the internet I would greatly appreciate it.
Thanks