Computer Science IIB 2010 Java - Sockets Intro: DR Marijke Coetzee E-Ring 230 (011) 559 - 2907
Computer Science IIB 2010 Java - Sockets Intro: DR Marijke Coetzee E-Ring 230 (011) 559 - 2907
2010
Java – Sockets intro
Dr Marijke Coetzee
E-Ring 230
(011) 559 -2907
marijkec@uj.ac.za
JAVA: Sockets
• Read http://queue.acm.org/detail.cfm?id=1538949
Whither Sockets?
1. Bind to a port
2. Listen for incoming data
3. Accept connections from remote machines SERVER
on the bound port
daytime 13 TCP/UDP Provides an ASCII representation of the current time on the server.
FTP data 20 TCP FTP uses two well-known ports. This port is used to transfer files.
FTP 21 TCP This port is used to send FTP commands like put and get.
SMTP 25 TCP The Simple Mail Transfer Protocol is used to send email between machines.
time 37 TCP/UDP A time server returns the number of seconds that have elapsed on the server since midnight,
January 1, 1900, as a four-byte, signed, big-endian integer.
finger 79 TCP A service that returns information about a user or users on the local system.
POP3 110 TCP Post Office Protocol Version 3 is a protocol for the transfer of accumulated email from the host to
sporadically connected clients.
NNTP 119 TCP Usenet news transfer; more formally known as the "Network News Transfer Protocol".
IMAP 143 TCP Internet Message Access Protocol is a protocol for accessing mailboxes stored on a server.
RMI Registry 1099 TCP The registry service for Java remote objects.
Computer Science IIB 11
Sockets basics
• Latency, a synonym for delay, is an expression of how much time it takes for
a packet of data to get from one designated point to another.