TCP标志位: 在TCP传输中,标志位用于表示特定的连接状态或提供额外信息.每个标志位占用1比特.常用的TCP标志位包含以下几种: SYN Synchronous,TCP三次握手建立连接的第一步,主动建立连接的一方发送SYN到被动建立连接一方.在下图中可以看到,发送方的SYN被置为1 ACK Acknowledgement,用于表示成功收到一个包 PUSH Push,告诉接收方处理接受到的数据包而不是缓冲它们 FIN Finish,表示发送方将不再发送数据,通常用于表示发送方发送的最后一个包
应用程序首选项(application preference)用来存储用户设置,考虑以下案例: a. 假设有一款MP3播放器程序,当用户调节了音量,当下次运行该程序时,可能希望保持上一次调节的音量值. b. 一款游戏的难易度设置. c. Twitter等社交程序的用户名和密码设置. iOS应用程序存储信息的方式很多,但主要有如下3种: 1. 单例类NSUserDefaults:NSUserDefaults类的工作原理类似于NSDirectionary,所有首选项都以键/值对的方式存储在NSUse