更新时间:2021-07-19 18:40:54
coverpage
iOS and OS X Network Programming Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Chapter 1. BSD Socket Library
Introduction
Finding the byte order of your device
Retrieving network address information
Performing a network address resolution
Creating an echo server
Creating an echo client
Creating a data server
Creating a data client
Chapter 2. Apple Low-level Networking
Creating a server to receive data
Creating a client to send data
Checking the network status
Chapter 3. Using Libnet
Installing libnet
Adding libnet to your project
Resolving names to addresses with libnet
Retrieving local addresses with libnet
Constructing a Ping packet with libnet
Constructing a UDP packet with libnet
Constructing a TCP packet with libnet
Chapter 4. Using Libpcap
Adding libpcap to your project
Retrieving network device information
Capturing packets
Decoding Ethernet headers
Decoding IP headers
Decoding ARP headers
Decoding TCP headers
Decoding UDP headers
Decoding ICMP headers
Filtering packets
Saving a capture file
Creating a simple port scanner using libnet and libpcap together
Chapter 5. Apple High-level Networking
Performing HTTP(S) synchronous GET requests
Performing HTTP(S) synchronous POST requests
Performing HTTP(S) asynchronous GET requests
Performing HTTP(S) asynchronous POST requests
Parsing an RSS feed with NSXMLParser NSURL and NSData
Creating a peer-to-peer bluetooth network
Chapter 6. Bonjour
Publishing a Bonjour service
Discovering a Bonjour service
Resolving a Bonjour service
Creating an echo server that uses Bonjour to advertise the service
Creating an echo client that uses Bonjour to discover the service
Chapter 7. AFNetworking 2.0 Library
Checking the network connection type and changes
Creating a web client using AFHTTPSessionManager
Creating a custom response serializer
Using the UIImageView+AFNetworking category
Downloading files with a progress bar
Chapter 8. MKNetworkKit
Creating and using the MKNetworkKit engine
Uploading a file using MKNetworkKit
Downloading a file using MKNetworkKit
Using the UIImageView+MKNetworkKitAdditions.h category and caching the images
Adding a progress bar to upload or download
Index