/// <summary>
        ///     Disconnect from FreeSwitch mod_event_socket
        /// </summary>
        /// <returns></returns>
        /// <summary>
        ///     Wait for all messages to be sent and close the connection
        /// </summary>
        /// <returns>Async task</returns>
        public async Task CloseAsync()
        {
            await ShutdownGracefully();

            await _channel.CloseAsync();

            _authenticated = false;
            _channel       = null;
        }
Esempio n. 2
0
        /// <summary>
        /// Wait for all messages to be sent and close the connection
        /// </summary>
        /// <returns>Async task</returns>
        public async Task CloseAsync()
        {
            await _channel.CloseAsync();

            _channel = null;
        }