W&T
end;
And finally the procedure that the Winsock control element
automatically invokes when data are received by the network:
procedure TForm1.ClientSocket1Read(Sender: TObject;
Socket: TCustomWinSocket);
var
BytesReceived:Integer;
begin
BytesReceived:=ClientSocket1.Socket.ReceiveLength;
ClientSocket1.Socket.ReceiveBuf(Counter, BytesReceived);
end;
The above example can of course be applied to all other
structures.
Subject to errors and modifications:
TCP / UDP - Binary
115