Creating a client to send data

In the Creating a data server recipe from Chapter 1, BSD Socket Library, we created a server that can receive incoming data. In this recipe, we will create a client application that will send images to that server.

Also note that the data client and server applications created in Chapter 1, BSD Socket Library, can be used interchangeably with the data client and server applications created in this chapter.

We will be expanding the CFSocketClient class that we wrote in the Creating a data client recipe from Chapter 1, BSD Socket Library, to handle both the echo client and the data client.

Getting ready

This recipe is compatible with both iOS and OS X. No extra frameworks or libraries are required.

How to do it...

Let's ...

Get iOS and OS X Network Programming Cookbook 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.