compile with userstate and session but still does nothing with them
receive_handler and send_handler are being called