Add send_code and implementation for check_server