Network Programming
Topics in this section include:
What a socket is
What you can do with a socket
The difference between TCP/IP, UDP/IP and Multicast sockets
How servers and clients communicate over sockets
How to create a simple server
How to create a simple client
How to create a multithreaded server
Introduction
The Internet is all about connecting machines together. One of the most exciting
aspects of Java is that it incorporates an easy-to-use, cross-platform model for
network communications that makes it possible to learn network programming
without years of study. This opens up a whole new class of applications to
programmers.
What is a Socket?
Java's socket model is derived from BSD (UNIX) sockets, introduced in the early
1980s for interprocess communication using IP, the Internet Protocol.
The Internet Protocol breaks all communications into packets, finite-sized chunks
of data which are separately and individually routed from source to destination. IP
allows routers, bridges, etc. to drop packets--there is no delivery guarantee. Packet
size is limited by the IP protocol to 65535 bytes. Of this, a minimum of 20 bytes
is needed for the IP packet header, so there is a maximum of 65515 bytes available
for user data in each packet.
Sockets are a means of using IP to communicate between machines, so sockets are
one major feature that allows Java to interoperate with legacy systems by simply
talking to existing servers using their pre-defined protocol.
Other common protocols are layered on top of the Internet protocol. The ones we
Download now
Topics in this section include:
What a socket is
What you can do with a socket
The difference between TCP/IP, UDP/IP and Multicast sockets
How servers and clients communicate over sockets
How to create a simple server
How to create a simple client
How to create a multithreaded server
Introduction
The Internet is all about connecting machines together. One of the most exciting
aspects of Java is that it incorporates an easy-to-use, cross-platform model for
network communications that makes it possible to learn network programming
without years of study. This opens up a whole new class of applications to
programmers.
What is a Socket?
Java's socket model is derived from BSD (UNIX) sockets, introduced in the early
1980s for interprocess communication using IP, the Internet Protocol.
The Internet Protocol breaks all communications into packets, finite-sized chunks
of data which are separately and individually routed from source to destination. IP
allows routers, bridges, etc. to drop packets--there is no delivery guarantee. Packet
size is limited by the IP protocol to 65535 bytes. Of this, a minimum of 20 bytes
is needed for the IP packet header, so there is a maximum of 65515 bytes available
for user data in each packet.
Sockets are a means of using IP to communicate between machines, so sockets are
one major feature that allows Java to interoperate with legacy systems by simply
talking to existing servers using their pre-defined protocol.
Other common protocols are layered on top of the Internet protocol. The ones we
Download now
Post a Comment