Chapter 13. Networked Applications
13.1. Introduction: Networking
Choose your protocol wisely
While Java makes it easy to create network connections on any protocol, experience shows that HTTP (and HTTPS) are the most universal. If you use a custom protocol talking to your own server, there are some users who will not be able to access your server. Bear in mind that in some countries, high-speed data (a.k.a. 3G) is either not yet available or very expensive, whereas GPRS/EDGE is less expensive and more widely available. Most GPRS service providers only allow HTTP/HTTPS connections, often through a WAP proxy. That being said, there may be things you need to do that can’t be done via HTTP—for example, because the protocol demands a different port number (e.g., SIP over port 5000). But do try to make HTTP your first choice when you can—you’ll include more customers.