Client.Disconnect Method

Disconnects a client.

Syntax

NSChannelMgr.Clients(index).Disconnect

Return Values

Returns an ActiveX HRESULT error code.

Remarks

If you remove an item from the Clients collection by using Disconnect, you must retrieve a new collection. In Visual Basic, this is done by reissuing use the Set method again to refresh the object.

Example

NSChannelMgr.Connect "LocalHost"
Dim Clients
Set Clients = NSChannelMgr.Clients
Clients(0).Disconnect
' show new number of clients
MsgBox Clients.Count & " clients now connected"
' reinitialize the collection
Set Clients = NSChannelMgr.Client

See Also

Client.ID, Client.ChannelID, Client.Address, Clients collection object, Client objects

© 1996-1998 Microsoft Corporation. All rights reserved.