Stochastic approximation and directive antennas in wireless networks