Chapter 14. Networking

This chapter covers the Microsoft .NET Framework networking classes, showing how they work and where there are differences from the java.net package. Table 14-1 shows the tiers of service provided by the classes in the java.net package alongside their .NET equivalents.

Table 14-1. Three Network Tiers of Service

Service Tier

Java

.NET

Request/response

URLConnection

System.Net.WebClient

  

System.Net.WebRequest

  

System.Net.WebResponse

Protocol

Socket

System.Net.Sockets.TcpClient

 

ServerSocket

System.Net.Sockets.TcpListener

 

DatagramSocket

System.Net.Sockets.UdpClient

 

MulticastSocket

 

Native socket access

N/A

System.Net.Sockets.Socket

The first section of this chapter discusses the WebClient, WebRequest, and WebResponse classes that support the ...

Get C# for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.