delphi - How to start Indy TCP Server with parameters? -
i building tcp server using indy 10 (from delphi 2009). in onexecute event need acces data main thread. possible pass data server thread when start ? server started idtcpserver1.active:=true; don't see how can pass parameters.
it not possible pass parameters tidtcpserver. server event handlers have retrieve data main thread when needed.
to keep track of per-connection data across events, can use tidcontext.data property, or derive custom class tidservercontext , assign tidtcpserver.contextclass property. instance, onconnect event handler can retrieve latest data main thread using tidsync or tthread.synchronize(), , cache in context onexecute use.
Comments
Post a Comment