Basic HTML version of Foils prepared June 5 99

Foil 67 Sockets for Network Communication

From Java Language in the Computer Science Curriculum ADMI Tutorial Duluth Minnesota -- June 3 99. by Geoffrey C. Fox


A java applet, which is downloaded from a web server host, can connect via a network socket to any port on the same machine. This could be a java application acting as a server.
Java applications can connect network sockets to any host machine on the Internet
  • Socket t = new Socket("internet host name", port)
  • sockets have methods to open input and output streams
web server host machine
browser
Applet is downloaded
from web server
applet
Internet
80
nnnn
web
server
Java
application
Socket based on
TCP/IP protocol



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Jun 5 1999