Function silc_client_command_pending
SYNOPSIS
void silc_client_command_pending(SilcClientConnection conn,
SilcCommand command,
SilcUInt16 cmd_ident,
SilcClientCommandReply reply,
void *context);
DESCRIPTION
This function can be used to add pending command callback to be
called when an command reply is received to an earlier sent command.
The `command' is the command that must be received in order for
the pending command callback indicated by `callback' to be called.
The `cmd_ident' is a command identifier which was set for the earlier
sent command. The command reply will include the same identifier
and pending command callback will be called when the reply is
received with the same command identifier. It is possible to
add multiple pending command callbacks for same command and for
same identifier.
Application may use this function to add its own command reply
handlers if it wishes not to use the standard `command_reply'
client operation.
Note also that the application is notified about the received command
reply through the `command_reply' client operation before calling
the `callback` pending command callback. That is the normal
command reply handling, and is called regardless whether pending
command callbacks are used or not.
EXAMPLE
SilcUInt16 cmd_ident;
cmd_ident = silc_client_command_call(client, conn,
"PING silc.silcnet.org");
silc_client_command_pending(conn, SILC_COMMAND_PING, cmd_ident,
my_ping_handler, my_ping_context);
|