I have opened a socket with NO server listening (as a test) and I still get a successful socket connection.
I receive the Log message socket connected even when nothing is listening.
How can i be getting a SUCCESS when there is nothing on the other end listening?
Thanks,
B4X:
If Main.TCP.IPaddress <> "" Then 'we have defined a server, but it is not online
Socket1.Close
XferFile.Initialize
Socket1.Initialize("Socket1")
SetBufferSize(Socket1, ChunkSize)
Socket1.Connect(Main.TCp.IPAddress, Main.TCP.Port, 0)
End If
B4X:
Sub Socket1_Connected (Successful As Boolean)
If Successful = True Then
Log("Socket connected")
Main.TCP.Connected = -1 'tell the app we have a TCP server available
MsgAcked = True
WeAreConnected = True
' N.SetInfo("Network", "TCP Connected! ", Main) 'let them know it is connected
Astreams.Initialize(Socket1.InputStream, Socket1.OutputStream, "AStreams")
SendMsg(chnCommands,"MYID:~" & Main.version.SerialNo & "~" & Main.LicenseData.GroupCode & "~Version: " & Main.Version.NewVersion & "~" & _
Main.CS.FacilityID & " " & Main.licensedata.Addr1 & " " & Main.LicenseData.City & ", " & Main.LicenseData.state) 'let them know who we are
End If
End Sub
How can i be getting a SUCCESS when there is nothing on the other end listening?
Thanks,