O'Reilly logo

C# for Java Developers by Adam Freeman, Allen Jones

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required