1. 24 Dec, 2008 1 commit
    • Max Kellermann's avatar
      client: always attempt to flush deferred buffers · d2d11d70
      Max Kellermann authored
      When a response is very long (e.g. a large playlist > 100k songs),
      most of it will end up in the deferred buffers.  Filling the deferred
      queue is very expensive currently, because a new buffer is allocated
      for every client_write() operation.  This may lead to long delays, and
      the client might give up and disconnect meanwhile.  This patch makes
      MPD attempt to flush the deferred queue as often as possible, to work
      around this problem.  Due to the MPD 0.14 code freeze, we should not
      optimize the buffering code now.
      d2d11d70
  2. 02 Dec, 2008 1 commit
  3. 24 Nov, 2008 1 commit
  4. 22 Nov, 2008 1 commit
  5. 31 Oct, 2008 5 commits
  6. 22 Oct, 2008 1 commit
  7. 17 Oct, 2008 7 commits
  8. 15 Oct, 2008 3 commits
  9. 14 Oct, 2008 1 commit
    • Max Kellermann's avatar
      command: added command "idle" · a3e3d2c9
      Max Kellermann authored
      "idle" waits until something noteworthy happens on the server,
      e.g. song change, playlist modified, database updated.  This allows
      clients to keep up to date without polling.
      a3e3d2c9
  10. 08 Oct, 2008 1 commit
  11. 17 Sep, 2008 1 commit
  12. 10 Sep, 2008 5 commits
  13. 07 Sep, 2008 7 commits
    • Max Kellermann's avatar
      command: use client_[gs]et_permission() · 1ce5f4d7
      Max Kellermann authored
      Don't pass a pointer to client->permission to processCommand(), better
      let the code in command.c use the new permission getter/setter
      functions.
      1ce5f4d7
    • Max Kellermann's avatar
      client: added client_[gs]et_permission() · 2835e376
      Max Kellermann authored
      The code in command.c shouldn't mess with a pointer to
      client->permission.  Provide an API for accessing this value.
      2835e376
    • Max Kellermann's avatar
      removed fdprintf() and client_print() · 86d261bd
      Max Kellermann authored
      All callers of fdprintf() have been converted to client_printf() or
      fprintf(); it is time to remove this clumsy hack now.  We can also
      remove client_print() which took a file descriptor as parameter.
      86d261bd
    • Max Kellermann's avatar
      client: removed client_get_fd() · 322e9088
      Max Kellermann authored
      Now that we have removed all invocations of client_get_fd(), we can
      safely remove this transitional function.  All access to the file
      descriptor is now hidden behind the interface declared in client.h.
      322e9088
    • Max Kellermann's avatar
      command: added command_success() and command_error() · 54371add
      Max Kellermann authored
      These two functions take a client struct instead of the file
      descriptor.  We will now begin passing the client struct around
      instead of a raw file descriptor (which needed a linear lookup in the
      client list to be useful).
      54371add
    • Max Kellermann's avatar
      client: added client_printf() · f73319c0
      Max Kellermann authored
      Based on client_puts(), client_printf() is the successor of
      fdprintf().  As soon as all fdprintf() callers have been rewritten to
      use client_printf(), we can remove fdprintf().
      f73319c0
    • Max Kellermann's avatar
      client: added client_write() and client_puts() · 33aec0d6
      Max Kellermann authored
      client_write() writes a buffer to the client and buffers it if
      required.  client_puts() does the same for a C string.  The next patch
      will add more tools which will replace fdprintf() later.
      33aec0d6
  14. 06 Sep, 2008 3 commits
  15. 29 Aug, 2008 2 commits
    • Max Kellermann's avatar
      export the function client_is_expired() · 8811c0e0
      Max Kellermann authored
      Instead of passing the pointer to the "expired" flag to
      processListOfCommands(), this function should use the client API to
      check this flag.  We can now remove the "global_expired" hack
      introduced recently.
      8811c0e0
    • Max Kellermann's avatar
      client: pass the client struct to processCommand() · 8b1b82b3
      Max Kellermann authored
      Start exporting the client struct as an opaque struct.  For now, pass
      it only to processCommand() and processListOfCommands(), and provide a
      function to extract the socket handle.  Later, we will propagate the
      pointer to all command implementations, and of course to
      client_print() etc.
      8b1b82b3