RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomWinSocket.Data Property

Points to application-specific data associated with the socket.

Pascal
property Data: Pointer;
C++
__property void * Data;

Use Data to associate information specific to the socket connection with the Windows socket object. For example, Data can be used to store access and authentication information used by a server socket to evaluate client connection requests.  

Data can store information in a thread-safe manner that would otherwise require the use of global variables. This is useful given the multi-threaded nature of many client-server applications. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!