See Also

Server Class  | Server 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

LocalEndPoint Property

Dart.PowerTCP.SslSockets Namespace > Server Class : LocalEndPoint Property (Server)

Returns the local address the Server object is bound to.

[Visual Basic]
<DescriptionAttribute("Returns the local address/port that the socket is bound to.")> <CategoryAttribute("Connection Info")> <BrowsableAttribute(False)> Public ReadOnly Property LocalEndPoint As IPEndPoint
[C#]
[DescriptionAttribute("Returns the local address/port that the socket is bound to.")] [CategoryAttribute("Connection Info")] [BrowsableAttribute(false)] public IPEndPoint LocalEndPoint {get;}
[C++]
[DescriptionAttribute("Returns the local address/port that the socket is bound to.")] [CategoryAttribute("Connection Info")] [BrowsableAttribute(false)] public: __property IPEndPoint* get_LocalEndPoint();
[C++/CLI]
[DescriptionAttribute("Returns the local address/port that the socket is bound to.")] [CategoryAttribute("Connection Info")] [BrowsableAttribute(false)] public: property IPEndPoint^ LocalEndPoint {    IPEndPoint^ get(); }

Return Type

A System.Net.IPEndPoint representing the local address the Server object is bound to.

Remarks

If the Server object is actively listening (Active = true), this property returns a System.Net.IPEndPoint representing the local end point (address and port) that the Server object is bound to. If the Server object is not actively listening (Active = false) this property returns a System.Net.IPEndPoint initialized to the address and port "0.0.0.0:0".

Example

The following example demonstrates the Server.ActiveChanged event.

[Visual Basic] 

Private Sub StartServer()
   ' Begin listening for connections on port 7.
   Server1.Listen(7)
End Sub

Private Sub Server1_ActiveChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Server1.ActiveChanged
   ' Check the Active property.
   If Server1.Active Then
      Label1.Text = "Server is listening at " + Server1.LocalEndPoint.ToString()
   Else
      Label1.Text = "Server is not listening."
   End If
End Sub

[C#] 


private void StartServer()
{
  
// Begin listening for connections on port 7.
  
server1.Listen(7);
}

private void server1_ActiveChanged(object sender, System.EventArgs e)
{
  
// Check the Active property.
  
if(server1.Active)
     label1.Text =
"Server is listening at " + server1.LocalEndPoint.ToString();
  
else
     
label1.Text = "Server is not listening.";
}
                

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

Server Class  | Server Members


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.