i am using delphi for almost 7 years and i need to convert my client Thread to B4A to work under service
i have read on tha forums on how to use socket and i come up with result like following
thats how to connect
and this is how i write
but i couldn't figure out how to do the same mechanism of my delphi code under b4a like using thread and readln and read stream continuously if a data available
i just wanted to convert from delphi to b4a
i have read on tha forums on how to use socket and i come up with result like following
thats how to connect
B4X:
Socket1.Initialize("Socket1")
Socket1.Connect("machine ip" , 27274, 20000)
ph.KeepAlive(True)
and this is how i write
B4X:
If Socket1.Connected Then
tr.Initialize(Socket1.OutputStream)
tr.WriteLine(cmd)
tr.Flush
End If
but i couldn't figure out how to do the same mechanism of my delphi code under b4a like using thread and readln and read stream continuously if a data available
i just wanted to convert from delphi to b4a
Last edited: