See Also

Segment Class  | Segment Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages PowerTCP SSL Sockets for .NET

Offset Property

Dart.PowerTCP.SslSockets Namespace > Segment Class : Offset Property (Segment)

The offset into the buffer.

[Visual Basic]
Public ReadOnly Property Offset As Integer
[C#]
public int Offset {get;}
[C++]
public: __property int get_Offset();
[C++/CLI]
public: property int Offset {    int get(); }

Return Type

An integer representing the offset into the buffer.

Remarks

Use this property to access offset parameter of the Receive and Send methods.

When using the Tcp component, using Send or Receive will return a Segment object. The buffer offset is available through Offset.

When using the Udp component, using Send or Receive will return a Datagram object. The buffer offset is available through Offset.

Use this property to properly access the data available in Buffer or 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 Offset or Offset property contains the offset into the buffer.

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 Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Segment Class  | Segment Members


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.