ClientSocket: TCustomWinSocket; CustomEvent:
Asta servers are non-blocking and event driven so normal messaging calls are not threaded. You can have ASTA launch a thread in response to a message from any ASTA client. If you want to use some database calls in this event use the ThreadedDBUtilityEvent.
See the AstaBDEServer for an example of how to use this method.
The ServerSocket is passed in so that you do not have to access the ServerSocket directly across Thread boundries. The ClientSocket is the actual Socket that is available to each client connected to the server. The CustomEvent your own custom procedure submitted for
threading. It must be a threaded procedure and should take the following format of its declaration which is declared as TAstaUtilityEvent.
procedure NameOfThreadedProcedure(Sender: TObject;ServerSocket:TAstaServerSocket;ClientSocket: TCustomWinSocket;
And in the implementation, a sample would be
procedure TForm1.NameOfThreadedProcedure(Sender: TObject;
ServerSocket:TAstaServerSocket;ClientSocket: TCustomWinSocket; Params:
// var yourvariables here;
// your thread-safe codes here