Hello friends,
Since I'm not too familiar with win programming may I ask a dumb question. I made a small app on D7 using TclientSocket which connects to some embedded server and request some data.
Now I use string based functions like
sock.Socket.SendText('text to send');
but I send pure binary commands so I defined some constants like
const
MOD_HEADER = #$45#$2A#$3F#$92#$3D#$29#$01#$7F#$2C#$3A#$42#$20#$1C#$7B#$D2#$F2;
and send
sock.Socket.SendText(MOD_HEADER);
Now the question is this is ok to do that way? I used this method to avoid filling by hand byte-by-byte some array since there are couple.
But I saw also
sock.Socket.SendStream(astream)
What are your experts oppinions ?
Thanks in advance,