日历
|
|
| 日 |
一 |
二 |
三 |
四 |
五 |
六 |
| | | 1 | 2 | 3 | 4 | 5 |
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | 30 | 31 | | |
搜索标题
-
2008-04-02 15:26:08
The word networking strikes fear in the hearts of many programmers.
Fear not! Using the networking capabilities provided in the Java
environment is quite easy. In fact, you may be using the
network already without even realizing it!
When two applications want to communicate to each other reliably, they
establish a connection and send data back and forth over that
connection. This is analogous to making a telephone call.
Consider, for example, a clock server that sends the current time to
its client when requested to do so. If the client misses a packet, it
doesn't really make sense to resend it because the time will be incorrect
when the client receives it on the second try. If the client makes two
requests and receives packets from the server out of order, it doesn't
really matter because the client can figure out that the packets are
out of order and make another request. The reliability of TCP is
unnecessary in this instance because it causes performance degradation
and may hinder the usefulness of the service.
查看(12)
评论(0)
收藏
推荐