The powers and duties of such officers shall be the same as those of police officers of towns.