addSocket()

in src/cloud-sql-instance.ts [378:390]


  addSocket(socket: DestroyableSocket) {
    if (!this.instanceInfo.domainName) {
      // This was not connected by domain name. Ignore all sockets.
      return;
    }

    // Add the socket to the list
    this.sockets.add(socket);
    // When the socket is closed, remove it.
    socket.once('closed', () => {
      this.sockets.delete(socket);
    });
  }