Delete observing on the remote server.

        :param response: the last received response
        :param send_rst: if explicitly send RST message
        :type send_rst: bool
335881
def cancel_observing(self, response, send_rst):  # pragma: no cover
        
        if send_rst:
            message = Message()
            message.destination = self.server
            message.code = defines.Codes.EMPTY.number
            message.type = defines.Types["RST"]
            message.token = response.token
            message.mid = response.mid
            self.protocol.send_message(message)
        self.stop()
1056958
def delete(self, request, bot_id, hook_id, id, format=None):
        
        bot = self.get_bot(bot_id, request.user)
        hook = self.get_hook(hook_id, bot, request.user)
        recipient = self.get_recipient(id, hook, request.user)
        recipient.delete()
        return Response(status=status.HTTP_204_NO_CONTENT)
570503
private void sendAndCleanupConnection(ChannelHandlerContext ctx, FullHttpResponse response) {
        final FullHttpRequest request = this.request;
        final boolean keepAlive = HttpUtil.isKeepAlive(request);
        HttpUtil.setContentLength(response, response.content().readableBytes());
        if (!keepAlive) {
            // We're going to close the connection as soon as the response is sent,
            // so we should also make it clear for the client.
            response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);
        } else if (request.protocolVersion().equals(HTTP_1_0)) {
            response.headers().set(HttpHeaderNames.CONNECTION, HttpHeaderValues.KEEP_ALIVE);
        }

        ChannelFuture flushPromise = ctx.writeAndFlush(response);

        if (!keepAlive) {
            // Close the connection as soon as the response is sent.
            flushPromise.addListener(ChannelFutureListener.CLOSE);
        }
    }
137985
def send_response(response)
      case response
      when Gopher::Response then send_response(response.body)
      when String then send_data(response + end_of_transmission)
      when StringIO then send_data(response.read + end_of_transmission)
      when File
        while chunk = response.read(8192) do
          send_data(chunk)
        end
        response.close
      end
    end
96517
def remove(self, recv):
        
        try:
            if recv.notify != self._put:
                raise ValueError
            self._receivers.remove(recv)
            recv.notify = None
        except (IndexError, ValueError):
            raise Error(self.not_present_msg)
490936
def quit
      resp = send_recv( KJess::Request::Quit.new )
      return KJess::Response::Eof === resp
    end
80663
def send_response(self, response):
        
        response_bytes = response.encode(config.CODEC)
        log.debug("About to send reponse: %r", response_bytes)
        self.socket.send(response_bytes)
1287090
function () {
          // don't do it twice
          if (!tcpConnections[msg.tcpId]) return;

          exports.verbose(new Date(), 'Connection closed by remote peer for: ' + addressForLog(msg.address, msg.port));

          newCon.removeAllListeners();
          delete tcpConnections[msg.tcpId];
          send(channel, new MSG.Close(msg.tcpId));
        }
434864
def _send_rst(self, transaction):  # pragma: no cover
        

        rst = Message()
        rst.type = defines.Types['RST']

        if not transaction.response.acknowledged:
            rst = self._messageLayer.send_empty(transaction, transaction.response, rst)
            self.send_datagram(rst)
1240507
def broadcast(self, response):
        ''''''
        remove = set()
        channel = to_string(response[0])
        message = response[1]
        if self.protocol:
            try:
                message = self.protocol.decode(message)
            except ProtocolError:
                self.logger.exception('Could not decode message')
                return
        for client in self._clients:
            try:
                client(channel, message)
            except IOError:
                remove.add(client)
            except Exception:
                self._loop.logger.exception(
                    'Exception while processing pub/sub client. Removing it.')
                remove.add(client)
        self._clients.difference_update(remove)
494931
def on_close(self):
        '''
        
        '''

        if self.id in self.funcserver.websocks:
            self.funcserver.websocks[self.id] = None
            ioloop = tornado.ioloop.IOLoop.instance()
            ioloop.add_callback(lambda: self.funcserver.websocks.pop(self.id, None))

        psession = self.funcserver.pysessions.get(self.pysession_id, None)
        if psession:
            psession['socks'].remove(self.id)
            if not psession['socks']:
                del self.funcserver.pysessions[self.pysession_id]
1160926
def remove_observer(self, signal, observer):
        

        self._is_allowed_event(signal)
        self._remove_observer(signal, observer)
710089
public static base_response clear(nitro_service client, rnat resource) throws Exception {
		rnat clearresource = new rnat();
		clearresource.network = resource.network;
		clearresource.netmask = resource.netmask;
		clearresource.aclname = resource.aclname;
		clearresource.redirectport = resource.redirectport;
		clearresource.natip = resource.natip;
		clearresource.td = resource.td;
		return clearresource.perform_operation(client,"clear");
	}
888577
def stringReceived(self, response):
        
        correlation_id = response[0:4]
        try:
            d = self._pending.pop(correlation_id)
        except KeyError:
            self._log.warn((
                "Response has unknown correlation ID {correlation_id!r}."
                " Dropping connection to {peer}."
            ), correlation_id=correlation_id, peer=self.transport.getPeer())
            self.transport.loseConnection()
        else:
            d.callback(response)
1012966
def remove(self, what, call):
        
        type = observerTypeEnum.typeOf(what)
        self._observers.remove({
                                    "observing": what,
                                    "type": type,
                                    "call": call
                                 })
142137
def delete(self, svc_rec=None, ipaddr=None, proto=None, port=None):
        
        return self.send.service_del(svc_rec, ipaddr, proto, port)
112358
def delete(self, endpoint, **kwargs):
        
        kwargs.update(self.kwargs.copy())
        response = requests.delete(self.make_url(endpoint), **kwargs)
        return _decode_response(response)