See Also

Segment Class  | Segment Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages PowerTCP Email Validation for .NET

Buffer Property

Dart.PowerTCP.EmailValidation Namespace > Segment Class : Buffer Property (Segment)

The buffer containing the data that was sent/received.

[Visual Basic]
Public ReadOnly Property Buffer As Byte()
[C#]
public byte[] Buffer {get;}
[C++]
public: __property byte[]* get_Buffer();
[C++/CLI]
public: property array<byte>^ Buffer {    array<byte>^ get(); }

Return Type

A byte array containing data that was sent/received over the socket.

Remarks

When using the Tcp component, using Tcp.Send or Tcp.Receive will return a Segment object. The data sent/received is available through Segment.Buffer.

When using the Udp component, using Udp.Send or Udp.Receive will return a Datagram object. The data sent/received is available through Datagram.Buffer.

When using other PowerTCP components, a Segment or Datagram object (which one depends on if TCP or UDP is used as the transport protocol) is made available to describe data sent or received, often in a Trace event. The Segment.Buffer or Datagram.Buffer property contains the actual data sent or received.

Example

The following example demonstrates connecting to a server while specifying a local interface to use.

[Visual Basic] 

' Connect to the server, specifying the local interface to use
Tcp1.Connect("atropos", 13, "192.168.0.83", 8888)

' Since connection was to DAYTIME port (13), simply receive the time
Dim seg As Segment = Tcp1.Receive()

Debug.WriteLine("Time reported by server: " + seg.ToString())

[C#] 


// Connect to the server, specifying the local interface to use
tcp1.Connect("atropos", 13, "192.168.0.83", 8888);

// Since connection was to DAYTIME port (13), simply receive the time
Segment seg = tcp1.Receive();

Debug.WriteLine(
"Time reported by server: " + seg.ToString());
                

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista

See Also

Segment Class  | Segment Members


Send comments on this topic.

Documentation version 1.0.3.0.

© 2008 Dart Communications.  All rights reserved.