Dart.PowerTCP.SslSockets Namespace > Server Class : Close Method (Server) |
Stops listening on the server but does not close active connections.
[Visual Basic]
Public Sub Close()
[C#]
public void Close();
[C++]
public: void Close();
[C++/CLI]
public:
void Close();
This method causes the Server object to stop listening for new connections. Any connections already accepted is maintained. Calling this method causes the ActiveChanged event to be raised.
If you would like to stop the server application and terminate current connections use Abort.
The following example demonstrates how to stop listening for new connections while maintaining current connections.
[Visual Basic]
Private Sub StopListening()
' Stop accepting connections while maintaining current connections
Server1.Close()
End Sub
[C#]
private void StopListening()
{
// Stop accepting connections while maintaining current connections
server1.Close();
}
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Send comments on this topic.
Documentation version 1.1.2.0.
© 2008 Dart Communications. All rights reserved.