SkWaRa 0 Newbie Poster

Hello, I've got a problem with packtes sending. I'd like to send packet that is record like this:

TPacket: Record
  Typ: Integer;
  Length: Integer;
  RequestType: Byte;
  Request: String; // or Array of Char
end;

I'm using TidTCPClient to send packets. But When I write:

client.WriteBuffer(Packet,SizeOf(Packet));

Client is TidTCPCLient var, and Packet is var of TPacket it sends packet as a binary but what I want is only part of record where vars are numbers (Typ, length, RequestType) to be sent as a binary and filed Request as a normal String. How to do this?
Thx for every response.

P.S.
My appologize to every one who read this post because of my english :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.