IOS---network errors

Source: Internet
Author: User

When loading a system using a URL in iOS, there may be a variety of problems with the connection between the phone and the server, but it can be broadly divided into three error categories: ①os error, ②http error, ③ application error

OS Error

① No network-if the device does not have a data network connection, the connection attempt is quickly rejected or failed. These errors can be detected through the reachability framework provided by Apple;
② cannot be routed to target host-the device may have network connectivity, but the target may be in an isolated network or offline;
③ No listener target Port-The packet is sent to the requested port number after the request reaches the destination host. If there is no server listening on this port or too many connection requests are queued, then it is possible to refuse;
④ cannot resolve target host name-These errors are caused by configuration errors or attempts to access hosts in an isolated network that do not have external name resolution.
(You can avoid many OS errors by checking the network status before attempting to initiate a network connection)

HTTP Error

HTTP errors are caused by an HTTP request, an HTTP server, or an application server problem. HTTP errors are sent to the requesting client through the status code of the HTTP response.
There are 5 types of HTTP errors:

  • Informational 100-level-information from the HTTP server indicating that the processing of the request will continue, but with a warning;
  • Successful level 200-the server processed the request;
  • Redirect Required level 300-indicates that the client must perform an action in order to continue the request because the required resources have been moved;
  • Client Error level 400-Indicates that the client issued error data that the server could not handle correctly;
  • Downstream error level 500-Indicates an error occurred between the HTTP server and the downstream application server
Application Error

Application errors are caused by business logic and applications that run at the service layer's IQ, for example, if a user tries to transfer money from an account that exceeds the available balance of the account, the mobile bank should report an application error

IOS---network errors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.