| Visual Basic (Declaration) | |
|---|---|
<DescriptionAttribute("Raised when data is sent/received to/from the POP server.")> <CategoryAttribute("Progress")> Public Event Trace As SegmentEventHandler | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Pop Dim handler As SegmentEventHandler AddHandler instance.Trace, handler | |
| C# | |
|---|---|
[DescriptionAttribute("Raised when data is sent/received to/from the POP server.")] [CategoryAttribute("Progress")] public event SegmentEventHandler Trace | |
| Managed Extensions for C++ | |
|---|---|
[DescriptionAttribute("Raised when data is sent/received to/from the POP server.")] [CategoryAttribute("Progress")] public: __event SegmentEventHandler* Trace | |
| C++/CLI | |
|---|---|
[DescriptionAttribute("Raised when data is sent/received to/from the POP server.")] [CategoryAttribute("Progress")] public: event SegmentEventHandler^ Trace | |
The event handler receives an argument of type SegmentEventArgs containing data related to this event. The following SegmentEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Exception | Gets any exception which occurred during the asynchronous operation. |
| Segment | The Segment object referencing the data that was sent or received. |
| State | Gets the object that was included as part of the associated method call. |
This event is raised when commands or data has been sent/received. If you are using a component which uses TCP as the transport protocol a SegmentEventArgs object is passed into the event containing any commands or data sent or received. If you are using a component which uses UDP as the transport protocol a DatagramEventArgs object is passed into the event containing any commands or data sent or received.
The Object.RawTrace event always reports actual data sent/received over the socket. The Count of each segment reflects the number of bytes actually written and received. The Object.Trace event reports data sent/received at a higher level. For example, for the Telnet component, Object.Trace reports data sent/received, but does not report IAC option sequences that are processed by TelnetStream, whereas Object.RawTrace allows you to trace the actual data sent/received, including Telnet option commands.
If you are using the PowerTCP component as a reference, you must create a method to handle the event yourself. For more information on using events using PowerTCP.NET within the Visual Studio.NET environment, see Using Events In PowerTCP.
Target Platforms: Microsoft .NET Framework 2.0