Send back the client we were sent, or construct a default one.

        @rtype vospace.client
354510
def client(self):
        
        if self._client is not None:
            return self._client
        self._client = vospace.client
        return self._client
456327
function Chat (client, opts) {
  var self = this
  if (!(self instanceof Chat)) return new Chat(client, opts)
  if (!opts) opts = {}

  self.client = client
}
300447
async def send_message(self, *args, **kwargs):
        
        message = await self._client.send_message(
            self._input_chat, *args, **kwargs)

        self._outgoing.add(message.id)
        self._last_outgoing = message.id
        return message
1328178
def client(self):
        
        if self._client is None:
            self._client = self._get_client()
        return self._client
852554
function handlevWSOpen(voiceSession) {
	return send(voiceSession.ws.connection, Payloads.VOICE_IDENTIFY(this.id, voiceSession));
}
169654
function Client (opts) {
  var self = this

  typeforce({
    url: 'String',
    otrKey: 'DSA',
    // byRootHash: 'Function',
    instanceTag: '?String',
    autoconnect: '?Boolean' // defaults to true
  }, opts)

  EventEmitter.call(this)
  this.setMaxListeners(0)

  this._url = parseURL(opts.url)
  this._autoconnect = opts.autoconnect !== false
  this._onmessage = this._onmessage.bind(this)
  this._sessions = {}
  this._otrKey = opts.otrKey
  this._fingerprint = opts.otrKey.fingerprint()
  this._connected = false
  this._instanceTag = opts.instanceTag
  this._backoff = backoff.exponential({ initialDelay: 100 })
  if (this._autoconnect) this.connect()
}
1339024
def commit(cls, client=None):
        
        if not client:
            client = cls._client
        rtn = client.write_points(cls._json_body_())
        cls._reset_()
        return rtn
224632
def client(self):
        
        if not hasattr(self, "_client"):
            self._client = connections.get_connection("default")
        return self._client
434223
def send_speaking(value)
      @bot.debug("Speaking: #{value}")
      @client.send({
        op: 5,
        d: {
          speaking: value,
          delay: 0
        }
      }.to_json)
    end
332242
def get_client
      init_opts = {
        client_id:     @CLIENT_ID,
        client_secret: @CLIENT_SECRET
      }

      if username? and password?
        init_opts[:username] = @USERNAME
        init_opts[:password] = @PASSWORD
      end

      Soundcloud.new(init_opts)
    end
627261
def save
      send("principals=", client_principal.to_abbreviated)
      client.put(api_path, to_json, headers)
      true
    end
1128640
def get_client_data(self, client):
        
        data = self._request('GET', '/clients/{}'.format(client))
        return data.json()
348916
async def handle_client_hello(self, client_addr, _: ClientHello):
        
        self._logger.info("New client connected %s", client_addr)
        self._registered_clients.add(client_addr)
        await self.send_container_update_to_client([client_addr])
794814
def send(self, msg):
        """"""
        def reconnect(e):
            self.log.error('send error, reconnecting...', exc_info=True)
            self.connect_ensime_server()
            if self.ws:
                self.ws.send(msg + "\n")

        self.log.debug('send: in')
        if self.running and self.ws:
            with catch(websocket.WebSocketException, reconnect):
                self.log.debug('send: sending JSON on WebSocket')
                self.ws.send(msg + "\n")
186999
def send_backspace(self, count):
        
        for i in range(count):
            self.interface.send_key(Key.BACKSPACE)
522007
public Client<? extends Options, ? extends OptionsBuilder, ? extends RequestBuilder> newClient() {
        if (clientClassName == null) {
            return new DefaultClient();
        } else {
            try {
                return (Client) Thread.currentThread().getContextClassLoader().loadClass(clientClassName).newInstance();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
    }
1296343
def send(self, from_client, message, to_clients=None, transient=False, push_data=None):
        
        if isinstance(message, dict):
            message = json.dumps(message)
        params = {
            'from_peer': from_client,
            'conv_id': self.id,
            'transient': transient,
            'message': message,
        }
        if to_clients:
            params['to_peers'] = to_clients
        if push_data:
            params['push_data'] = push_data
        client.post('/rtm/messages', params=params).json()