Unsubscribe a client from the channel.
12842
def unsubscribe(self, client):
        """"""
        if client in self.clients:
            self.clients.remove(client)
            log("Unsubscribed client {} from channel {}".format(client, self.name))
484003
def purge(self):
        
        self.channel.purge_stream(self.stream_id, remove_definition=False, sandbox=None)
750043
async def unsubscribe(self, topic: str):
        

        req_msg = {
            'type': 'unsubscribe',
            'topic': topic,
            'response': True
        }

        await self._conn.send_message(req_msg)
252517
public void unsubscribe(String channel) {
		ChannelSubscription subscribedChannel = subscribedChannels.get(channel);

		if (isUnsubscribeValid(channel, subscribedChannel)) {
			subscribedChannel.setSubscribeOnReconnected(false);
			unsubscribe(channel, true, subscribedChannel.isWithNotification());
		}

		//subscribedChannels.remove(channel);
	}
408740
def stop(self):
        """"""
        self._presubs.remove(self._sdk_presub_params)
        if self._immediacy == FirstValue.on_value_update:
            self._unsubscribe_all_matching()
        super(ResourceValues, self).stop()
1180213
def handle_unsubscribe(self, request):
        # type: (Unsubscribe) -> CallbackResponses
        """"""
        subscribe = self._subscription_keys.pop(request.generate_key())
        ret = self._tree.handle_unsubscribe(subscribe, subscribe.path[1:])
        return ret
905780
function(client, subscriptions, backlog, channel, callback, done_callback) {
    if ( addToBacklog(client, backlog, unsubscribeBrowser, [client, subscriptions, backlog, channel, callback, done_callback]) ) return;
    if (subscriptions[channel]===undefined)
        return;
    subscriptions[channel].splice(subscriptions[channel].indexOf(callback), 1);
    if (subscriptions[channel].length===0) {
        delete subscriptions[channel];
        client.unsubscribe(channel, {onSuccess : function() {
            // If there is a done_callback defined, execute it
            if (done_callback!==undefined) done_callback();
        }});
    }
}
277756
def _unsubscribe_myself(self):
        """"""
        url = UNSUBSCRIBE_ENDPOINT
        return self._session.query(url, method='GET', raw=True, stream=False)
1308374
def unsubscribe(self):
        
        # Trying to unsubscribe if already unsubscribed, or not yet
        # subscribed, fails silently
        if self._has_been_unsubscribed or not self.is_subscribed:
            return

        # Cancel any auto renew
        self._auto_renew_thread_flag.set()
        # Send an unsubscribe request like this:
        # UNSUBSCRIBE publisher path HTTP/1.1
        # HOST: publisher host:publisher port
        # SID: uuid:subscription UUID
        headers = {
            'SID': self.sid
        }
        response = None
        try:
            response = requests.request(
                'UNSUBSCRIBE',
                self.service.base_url + self.service.event_subscription_url,
                headers=headers,
                timeout=3)
        except requests.exceptions.RequestException:
            pass

        self.is_subscribed = False
        self._timestamp = None
        log.info(
            "Unsubscribed from %s, sid: %s",
            self.service.base_url + self.service.event_subscription_url,
            self.sid)
        # remove queue from event queues and sid to service mappings

        with _subscriptions_lock:
            try:
                del _subscriptions[self.sid]
            except KeyError:
                pass
        self._has_been_unsubscribed = True

        # Ignore "412 Client Error: Precondition Failed for url:"
        # from rebooted speakers.
        if response and response.status_code != 412:
            response.raise_for_status()
88584
def unsubscribe(self, channel):
        
        try:
            CHANNELS[channel].remove(self.socket.session.session_id)
            self.channels.remove(channel)
        except ValueError:
            return False
        return True
1144743
def client_end(request, socket, context):
    
    # Send the unsubscribe event prior to actually unsubscribing, so
    # that the finish event can still match channels if applicable.
    for channel in socket.channels:
        events.on_unsubscribe.send(request, socket, context, channel)
    events.on_finish.send(request, socket, context)
    # Actually unsubscribe to cleanup channel data.
    for channel in socket.channels[:]:
        socket.unsubscribe(channel)
    # Remove the client.
    del CLIENTS[socket.session.session_id]
158556
def unsubscribe_all(self, callback=False):
        """"""
        futures = ((f, r) for f, r in self._requests.items()
                   if isinstance(r, Subscribe)
                   and f not in self._pending_unsubscribes)
        if futures:
            for future, request in futures:
                if callback:
                    log.warn("Unsubscribing from %s", request.path)
                    cothread.Callback(self.unsubscribe, future)
                else:
                    self.unsubscribe(future)
367848
def stop_subscribe(self):
        
        asyncio.gather(*asyncio.Task.all_tasks()).cancel()
        self.event_loop.stop()
        self.event_loop.close()
948714
public void unsubscribeFromTopic() {
        try {
            HttpGet request = new HttpGet(unsubscribeUrl.toURI());
            HttpResponse response = httpClient.execute(request);
            if (!ApacheUtils.isRequestSuccessful(response)) {
                throw new SdkClientException(String.format("Could not unsubscribe from %s: %d %s.%n%s",
                                                           getTopicArn(),
                                                           response.getStatusLine().getStatusCode(),
                                                           response.getStatusLine().getReasonPhrase(),
                                                           IOUtils.toString(response.getEntity().getContent())));
            }
        } catch (Exception e) {
            throw new SdkClientException(e);
        }

    }
1340869
def unsubscribe_multi(self, topics):
        """"""
        if self.sock == NC.INVALID_SOCKET:
            return NC.ERR_NO_CONN
        
        self.logger.info("UNSUBSCRIBE: %s", ', '.join(topics))
        return self.send_unsubscribe(False, [utf8encode(topic) for topic in topics])
662421
def handle_unsubscribe(client, data)
      topic = @engine.unsubscribe_client_from_topic(client, data[0])

      trigger(:unsubscribe, client, topic.uri)
    end
908565
public <T extends DObject> void unsubscribeFromObject (int oid, Subscriber<T> target)
    {
        queueAction(oid, target, false);
    }