add connected judge for client socket send function