由于我只看到新电文出现,而模拟曲线在包含服务器组成部分的形式上移动时,才会出现。
I created the component at run time using this code:
private
{ Private declarations }
Srv: TIdUDPServer;
...
procedure TForm1.FormCreate(Sender: TObject);
begin
Srv := TIdUDPServer.Create(Self);
Srv.DefaultPort := 9009;
Srv.OnUDPRead := Self.udpServerUDPRead;
Srv.Active := True;
end;
我更喜欢使用专断或服务。 我是否需要一个(无形的)窗口来处理+某些窗户信息密码,使这一组成部分发挥作用?
最新情况:一些(非正式)documentation 说:
TIdUDPServer when active creates a listening thread to listen for inbound UDP packets. ... When ThreadedEvent is false, the OnUDPRead event will be fired in the context of the main program thread. When ThreadedEvent is true, the OnUDPRead event is fired in the context of the listener thread.