when connected,server will send a connect flag to  client