Added ability to set protocol.