separate the protocol from the connection so that it can be used for more than net.Conns