Hi guys, im trayng to send a record with a stream size to send a image.
Example
PCtlCmd = ^TCtlCmd;
TCtlCmd = packed record
Cmd: Byte;
ImageSize: integer;
end;
//SENDING
begin
MemoryStream := TMemoryStream.Create;
img1.Picture.Graphic.SaveToStream(MemoryStream);
MemoryStream.Seek(0, soFromBeginnin
Hi,
Do not activate the message pump in an event. ShowMessage() activate the
message pump, so TWSocket will receive again and again because you are
in a form waiting. If you wants to log for debugging purpose use
WriteLn() or write to a file.
Rgds, Wilfried
Met vriendelijke groeten,
Wilfrie
Cant Solve :(
Sent from [ProtonMail](https://protonmail.ch), encrypted email based in
Switzerland.
Original Message
Subject: Re: [twsocket] WSocket Record and Stream
Local Time: 2 de Janeiro de 2017 3:20 PM
UTC Time: 2 de Janeiro de 2017 17:20
From: wilfr...@mestdagh.biz
To:
> nLen := WSocket1.Receive(@FCmd2[FPos], SizeOf(TCtlCmd2) - FPos);
Why do you only want to receive a little part of what you are sending?
You should fill a much large buffer and then parse that for your record.
Beware TCP packets can be split and combined, and are not necessarily
the same as whe