Skip to main content

POSIX Socket API: Connectionless Communication

  • Chapter
Pro Android C++ with the NDK
  • 1862 Accesses

Abstract

In the previous chapter, you started exploring the POSIX Socket APIs by going through an example of a connection-oriented communication application using the TCP protocol. In this chapter, you will learn how to establish a connectionless communication between the Android application and a remote end-point. Connectionless communication through UDP sockets provides a lightweight communication medium tailed for real-time applications that can work with unordered and lost data packets. This type of connection does not maintain an open connection. Packets get sent to the target protocol address as needed. Since there is no connection in place, packets may get lost or get out of order during transition. The protocol does not provide any service to handle such situations. Throughout this chapter you will continue to modify the example Echo application to include both UDP server and client native implementations.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Onur Cinar

About this chapter

Cite this chapter

Cinar, O. (2012). POSIX Socket API: Connectionless Communication. In: Pro Android C++ with the NDK. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4828-6_9

Download citation

Publish with us

Policies and ethics