BASS.NET API for the Un4seen BASS Audio Library

BroadCastDisconnect Method

BASS.NET API for the Un4seen BASS Audio Library

Namespace:  Un4seen.Bass.Misc
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax

public bool Disconnect()

Return Value

Type: Boolean
on success (not connected), else (connection status unknown, see LastError or LastErrorMessage for details).
Remarks

This method disconnects no matter if you started broadcasting in the automatic mode (via AutoConnect) or manually (via Connect).

Note: If you stop or free the underlying stream channel you must also call this method in order to disconnect from the server.

Caution: Disconnecting will in any case also stop the underlying server encoder in use (StopEncoder will be called!). So if you started broadcasting in the manual mode (via Connect) you need to manually start your encoder again. If you have enabled the AutoReconnect feature a EncoderRestartRequired event Notification will be raised.

If this method returns , check the Status, it might be the case, that you are still connected (e.g. if the encoder could not be stopped)!

Once disconnected successfully, the AutoConnect feature will also be disabled (no further connect retries will be made). You need to start broadcasting again via Connect or AutoConnect in order to restart.

See Also

Reference