Trace Property  
 

Enable or disable socket function level tracing.

Syntax

object.Trace [= { True | False } ]

Remarks

The Trace property is used to enable or disable the logging of Windows Sockets function calls. When enabled, each function call is logged to a file, including the function parameters, return value and error code if applicable. This facility can be enabled and disabled at run time, and the trace log file can be specified by setting the TraceFile property. All function calls that are being logged are appended to the trace file, if it exists. If no trace file exists when tracing is enabled, the trace file is created.

The tracing facility is available in all of the networking controls, and is enabled or disabled for an entire process. This means that once tracing is enabled for a given control, all of the function calls made by the process using any of the SocketTools controls will be logged. For example, if you have an application using both the FTP and POP3 controls, and you set the Trace property to True on the FTP control, function calls made by both the FTP and POP3 controls will be logged. Additionally, enabling a trace is cumulative, and tracing is not stopped until it is disabled for all controls used by the process.

If tracing is not enabled, there is no negative impact on performance or throughput. Once enabled, application performance can degrade, especially in those situations in which multiple processes are being traced or the trace file is fairly large. Since trace files can grow very quickly, even with modest applications, it is recommended that you delete the file when it is no longer needed.

Note that only those function calls made by the SocketTools networking controls will be logged. Calls made directly to the Windows Sockets API, or calls made by other controls, will not be logged.

Data Type

Boolean

See Also

TraceFile Property, TraceFlags Property