You must at least specify the remote host and port to connect to.
You must at least specify the remote host and port to connect to.
The host may be specified as either a string like "utopia.poly.edu" or as an InetAddress object.
The port should be an int between 1 and 65535.
Socket webSunsite = new Socket("sunsite.unc.edu", 80);
Previous slide
Next slide
Back to first slide
View graphic version