basic wifi question

Im trying to understand the WiTap example and Ive kinda got it figured out but Im struggling to adapt it to my needs.
What Im trying to do is get it to automatically connect to the first server it finds rather than showing the user a list of servers in a table view. So Im wanting to take out the functionality from the BrowseViewController and put it in a class which will do what I need.

Im just needing some pointers really, or perhaps some sample code, which would be great!