Like This Site? 
 
RSS Feed Follow Us 

on Twitter! Be Our Fan!

Complete Java Networking Explained with Examples

Share this post!
 Vote this!

In Java, networking is performed using Transmission Control Protocol/Internet Protocol (TCP/IP) or the User Datagram Protocol (UDP).

Java provides a low-level control on the connection, allowing you to customize it according to your requirements. The package containing networking classes, called java.net, is shipped as part of the Java Development Kit (JDK). In Java, TCP connections are established using sockets and server sockets. These connections allow you to send and receive data to a Web Site. On the other hand, broadcast messages known as datagrams use the UDP. Datagram’s are encapsulated in a datagram packet and sent using a datagram socket. URLs can be created and modified using the URL class methods of Java.

Socket Overview

A socket forms the interface between the protocol and client for communication. A Java socket forms the base for data transmission between two computers using TCP/IP. The socket specifies the site address and the connection port. When packets reach a client or server, they are routed to the destination port specified in packet header.  more...

0 comments:

Post a Comment