Cryptography Reference
In-Depth Information
TABLE 15.1
Protocol
Port
echo
7
discard
9
daytime
13
ftp-data
20
ftp
21
telnet
23
smtp
25
time
37
whois
43
finger
79
http
80
pop3
110
nntp
119
RMI registry
1099
Socket connectionClientSide =
new Socket(“WupAssGameMachine”,54321);
The server's name can be any of the following:
1.
Its name on a network (if the client is also part of that network),
2.
Its domain name on the Internet (if it has one), or
3.
Its IP (Internet Protocol) address (this is a number in dotted quad format, like 127.0.0.1).
Any computer connected to the Internet will have an IP address.
If anything goes wrong in setting up, the ServerSocket and socket constructors can throw
various exceptions, as listed in Table 15.2.
TABLE 15.2
ServerSocket()
Socket()
IOException
IOException
BindException
UnknownHostException
Search WWH ::




Custom Search