.
.

Sunday, June 29, 2014

iOS and OS X Network Programming Cookbook

DETAIL

  • Author: Jon Hoffman
  • Language: English
  • Published: 2014
  • Page: 300
  • Format: pdf
  • Size: 3 MB









CONTENTS
 

Preface 1

Chapter 1: BSD Socket Library 7

Introduction 7
Finding the byte order of your device 10
Retrieving network address information 12
Performing a network address resolution 16
Creating an echo server 22
Creating an echo client 31
Creating a data server 38
Creating a data client 42

Chapter 2: Apple Low-level Networking 45
Introduction 45
Retrieving network address information 46
Performing a network address resolution 48
Creating an echo server 55
Creating an echo client 63
Creating a server to receive data 68
Creating a client to send data 76
Checking the network status 78

Chapter 3: Using Libnet 83
Introduction 83
Installing libnet 89
Adding libnet to your project 91
Resolving names to addresses with libnet 93
Retrieving local addresses with libnet 97
Constructing a Ping packet with libnet 100
Constructing a UDP packet with libnet 106
Constructing a TCP packet with libnet 113

Chapter 4: Using Libpcap 123
Introduction 123
Adding libpcap to your project 125
Retrieving network device information 128
Capturing packets 130
Decoding Ethernet headers 136
Decoding IP headers 139
Decoding ARP headers 142
Decoding TCP headers 146
Decoding UDP headers 149
Decoding ICMP headers 151
Filtering packets 154
Saving a capture file 157
Creating a simple port scanner using libnet and libpcap together 159

Chapter 5: Apple High-level Networking 167
Introduction 167
Performing HTTP(S) synchronous GET requests 168
Performing HTTP(S) synchronous POST requests 172
Performing HTTP(S) asynchronous GET requests 176
Performing HTTP(S) asynchronous POST requests 182
Parsing an RSS feed with NSXMLParser, NSURL, and NSData 185
Creating a peer-to-peer bluetooth network 193

Chapter 6: Bonjour 199
Introduction 199
Publishing a Bonjour service 200
Discovering a Bonjour service 204
Resolving a Bonjour service 209
Creating an echo server that uses Bonjour to advertise the service 212
Creating an echo client that uses Bonjour to discover the service 218

Chapter 7: AFNetworking 2.0 Library 227
Introduction 227
Checking the network connection type and changes 228
Creating a web client using AFHTTPSessionManager 230
Creating a custom response serializer 235
Using the UIImageView+AFNetworking category 239
Downloading files with a progress bar 243

Chapter 8: MKNetworkKit 247
Introduction 247
Creating and using the MKNetworkKit engine 249
Uploading a file using MKNetworkKit 253
Downloading a file using MKNetworkKit 258
Using the UIImageView+MKNetworkKitAdditions.h category and
caching the images 261
Adding a progress bar to upload or download 266
Index 271

DOWNLOAD HERE

No comments:

Post a Comment