Indy 9
|
TIdUDPServer = class(TIdUDPBase)
TIdUDPServer uses an instance of TIdUDPListener to perform read operations for multiple socket bindings created by the server.
TIdUDPServer can be used as an ancestor class for other server components based on the User Datagram Protocol. TIdTrivialFTPServer is a descendant of the TIdUDPServer component.
property Bindings: TIdSocketHandles;
Bindings provides the DefaultPort number for the TIdUDPServer and is used by the TIdUDPListenerThread to gain access to the socket handle and low-level access methods provided by the protocol stack.
property DefaultPort: integer;
TIdUDPServer uses the DefaultPort number to bind the allocated datagram socket handle when the Active property to set to True.
property ThreadedEvent: boolean;
When ThreadedEvent is True, the TIdUDPListenerThread.UDPRead method is used to handle read operations. The default value for ThreadedEvent is False.
constructor Create(axOwner: TComponent); override;
Note: The Host and DefaultPort properties must set to the desired values before the UDP server can be activated.
destructor Destroy; override;
Destroy should not be directly called in an application. Use Free instead. Free checks to ensure that the object reference is not Nil before calling Destroy.
Note: If an exception is emitted from the constructor, the destructor is called to destroy the partially constructed object instance. Destructors should check that allocated resources, such as handles, were actually allocated before trying to release them.
property OnUDPRead: TUDPReadEvent;
Assign a TUDPReadEvent handler procedure to OnUDPRead to respond to the event.