Skip to content
Advertisement

Which is fast URLConnection or Socket

For getting data from remote url which connection type will work fast URLConnection or Socket.

Advertisement

Answer

Both have different purposes, depending upon your need

A socket can implement almost a duplex kind of functionality, whereas a url connection can connect to a given URI and read its content.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement