and the event is declared as follows
TSocketNotifyEvent = procedure (Sender: TObject; Socket: TCustomWinSocket) of object;
so that you write a function with these parameters, for example
procedure OnReadx(Sender: TObject; Socket: TCustomWinSocket);
and assign it as in the code:
cs.OnRead:=OnReadx;
Regards,
source
share