#include <cat/dasp.h>
int catdasp_handshake(cat_session *sess, catdasp_info *info, int fd_ids);
The info strucure must have been created by a previous call to catdasp_new_info().
If fd_ids is specified as 0, server side protocols will use (CAT_CLENT_RFD
| CAT_CLIENT_WFD
) and client side protocols will use (CAT_SERVER_RFD
| CAT_SERVER_WFD
).
Once the protocol has been determined, the protocol handler for that protocol, as assigned by the catdasp_setprotocols() function, will be invoked.
If the handshake was successful, the client side certificate can be retrieved with the catcert_getpeercert() function.
catcert_getpeercert, catdasp_setprotocols