I know this question is asked a lot, I’ve done some search before i post my question here but still can not manage to find a solution for my problem.
In Delphi VCL, i can identify whether a socket is connected or not using;
if Socket.Connected = True then
But in Delphi FMX on Android, there is no such function!
//Connect to VCL server
FClientSocket := TSocket.Create(TSocketType.TCP);
FClientSocket.Connect(string.Empty, ‘192.168.1.155’+#0, string.Empty, 4851);
//if FClientSocket.Connected then
while True do
// Receive the message from the VCL server
// Some code here…