added adhoc option (close #33), TLSv1 by default (close #30)

@ben-jones, can you please review this?