#[connected_hook]
Expand description
Registers a function as a connected hook.
This attribute macro registers the decorated function to be executed when a new client
connection is established. This macro requires the #[hyperlane(server: Server)]
macro to be used to define the server instance.
§Usage
use hyperlane::*;
use hyperlane_macros::*;
#[connected_hook]
async fn handle_new_connection(ctx: Context) {
// Connection handling logic
}
§Dependencies
This macro depends on the #[hyperlane(server: Server)]
macro to define the server instance.