Chapter     8

POSIX Socket API: Connection-Oriented Communication

As they get executed in an isolated environment distant from the user, native code applications require a medium of communication either with their parent applications or the external world in order to provide any services. In Chapter 3, you explored the JNI technology enabling the native code to communicate with its parent Java application. Starting with this chapter, you will start exploring the POSIX Socket APIs available through Bionic that enable the native code to communicate with the external world directly without calling into the Java layer.

A socket is a connection end-point that can be named and addressed in order to transmit data between applications that are running ...

Get Pro Android C++ with the NDK 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.