Skip to content

Commit

Permalink
Improve client callback documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ungive committed Feb 17, 2025
1 parent f5e664e commit 742235c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/include/loon/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ContentHandle
class IClient
{
public:
virtual ~IClient(){};
virtual ~IClient() {};

/**
* @brief Connects to the server and maintains a connection.
Expand Down Expand Up @@ -189,6 +189,9 @@ class IClient
/**
* @brief Sets a callback for when the client is connected and ready.
*
* This method is called during or after start() has been called
* and it indicates that the client is ready to serve registered content.
*
* The registered callback is guaranteed to be executed
* before any call to wait_until_ready() returns.
*
Expand All @@ -203,6 +206,9 @@ class IClient
/**
* @brief Sets a callback for when the client disconnected.
*
* This method is only called after start() has been called and only after
* the client was connected and the on_ready() callback was called.
*
* This callback is guaranteed to be called, even when the client fails.
*
* It is recommended to call this method before start(),
Expand Down

0 comments on commit 742235c

Please sign in to comment.