
Java
A packet sent over a perfect channel does not contain any information about its source or its destination. The channel contains that information. In contrast, a datagram packet must contain the complete address of its source or destination (depending on if the datagram is sent or received).
Definition: A datagram is an independent, self-contained message sent over the network whose arrival, arrival time, and content are not guaranteed.
The Java.net package contains two classes to help you write Java programs that use the datagram model to send and receive packets over the network: DatagramSocket and DatagramPacket. A DatagramSocket is a communcation link used to send datagrams between applications. A DatagramPacket is a message sent between applications via a DatagramSocket.
Copyright © 2026 eLLeNow.com All Rights Reserved.