/// <summary>
        /// Disconnect from the remote ros environment.
        /// </summary>
        public void Disconnect()
        {
            if (!this.IsConnected)
            {
                return;
            }

            //	this.sendMsgThread.Abort();

            this.isConnected = false;
            Thread.Sleep(15);

            foreach (var sub in this.subscribers)
            {
                this.webSocket.Send(RosBridgeMsg.UnSubscribe(sub.Key.Topic));
            }
            foreach (var pub in this.publishers)
            {
                this.webSocket.Send(RosBridgeMsg.UnAdvertiseTopic(pub.Topic));
                pub.Unadvertise();
            }
            foreach (var srv in this.serviceProviders)
            {
                this.webSocket.Send(RosBridgeMsg.UnadvertiseService(srv.Key.Name));
            }

            this.webSocket.Close();
            this.msgQueue.Clear();
        }
        /// <summary>
        /// Remove a Service server from this connection
        /// </summary>
        /// <param name="serviceProvider"></param>
        public void Unadvertise(RosBridgeServiceProvider serviceProvider)
        {
            if (this.IsConnected)
            {
                this.webSocket.Send(RosBridgeMsg.UnadvertiseService(serviceProvider.Name));
            }

            this.serviceProviders.Remove(serviceProvider);
        }