Interprocess Communication: The Application Program Interface (API) To UDP Provides A Abstraction (Concept)
Interprocess Communication: The Application Program Interface (API) To UDP Provides A Abstraction (Concept)
• Introduction
• The application program interface (API) to UDP
provides a message passing abstraction (concept);
• a destination computer.
INTERPROCESS COMMUNICATION
• The application program interface (API) to TCP
provides the abstraction of
• Message destinations
• Messages are sent to (Internet address, local port)
pairs.
• A local port is a message destination within a
computer, specified as an integer.
• without acknowledgement.
try {
UDPEchoServer server = new
UDPEchoServer(port);
server.loadQuotesFromFile(quoteFile);
server.service();
} catch (SocketException ex) {
System.out.println("Socket error: " +
ex.getMessage());
} catch (IOException ex) {
System.out.println("I/O error: " +
ex.getMessage());
}
}
InetAddress clientAddress =
request.getAddress();
int clientPort = request.getPort();