Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jul : OnUDPRead event handler...
| Subject: | OnUDPRead event handler... |
| Posted by: | "Gene Buckle" (gen..@grumble.deltasoft.com) |
| Date: | 8 Jul 2008 15:57:14 |
I'm working on setting up a UDP server to run within a DLL and I'm having
a difficult time assinging the OnUDPRead handler.
Right now I'm working with just an empty handler:
procedure UDPReadHandler(AThread : TIdUDPListenerThread; AData : TIdBytes;
ABinding : TIdSocketHandle);
begin
end;
followed later by...
UDPServer := TIdUDPServer.Create(nil);
UDPServer.DefaultPort := 5502;
UDPServer.Active := true;
UDPServer.OnUDPRead := UDPReadHandler;
The UDPServer.OnUDPRead line generates:
"E2009 Incompatible types: 'method pointer and regular procedure'"
Is there any way I can get around this or do I have to create a class just
to handle this one function?
tnx!
g.
--
Proud owner of F-15C 80-0007
http://www.f15sim.com - The only one of its kind.