Sending data from TIdTCPClient to TServerSocket in FMX is not working for Delphi XE8


I’m using Delphi XE8 trail version for developing application mobile application. Currently I’m facing very critical problem below I have explained clearly.

My Project is divided into two different applications:

Application A: This application is developed using Delphi XE8 as VCL application. This application has the TServerSocket. And receives the data using array of bytes. Mostly, this application receives the data as packed record and based on the Message Header the next step will be taken place.

Application B: This application is developed using Delphi XE8 as Multi Device mobile application. This application has TIdTCPClient. And sends the data as mentioned below:

TSamplePacket = packed record
strValue: array [0..10] of Char;

Procedure SendData;
SamplePacket: TSamplePacket;
SamplePacket.strValue := ‘1000’;
IdTCPClient1.IOHandler.Write(@SamplePacket, SizeOf(TSamplePacket));

And for IdTCPClient, IOHandler is assigned .

Problem: When I called SendData procedure in Delphi XE8 Multidevice mobile application it have not received any data in server app and also no exception is raised in client. And I have checked in Windows 7 desktop and also Android mobile Lolipop version mobile. In both device, the client application is not sending the data. And same code worked finely in Delphi XE7 for Windows application and Android KitKat version mobile application. And In Delphi XE8 Multi Device mobile application, I have tried to convert the packed record to TIDBytes. But I don’t know how to do this.?

But when I have created Delphi XC8 VCL Application and implemented the same code and the same components and I tried to send the data, it receiving data in the Server application.

And in Delphi XE8 Multidevice mobile application, if I tried to send the text which is shown below:


And when I used this I can able to receive the data in Server application.

Please provide me any help to send this buffer data to server socket properly. And Thanks in advance

Comments are closed.