Now chooses only one protocol during the handshake (thanks Daniel Swarbrick)
Renamed MessageResource to Resource