change tcp port
send connected flag when client connected