Update dialog.cpp and dialog.h by connect to host