CN104244290A - Time-controllable IOS (internet work operating system) intranet reachability detecting system and method - Google Patents

Time-controllable IOS (internet work operating system) intranet reachability detecting system and method Download PDF

Info

Publication number
CN104244290A
CN104244290A CN201410502275.5A CN201410502275A CN104244290A CN 104244290 A CN104244290 A CN 104244290A CN 201410502275 A CN201410502275 A CN 201410502275A CN 104244290 A CN104244290 A CN 104244290A
Authority
CN
China
Prior art keywords
ios
module
parameter
network
intranet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410502275.5A
Other languages
Chinese (zh)
Other versions
CN104244290B (en
Inventor
李�杰
侯文彪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunming Iron and Steel Group Co Ltd
Original Assignee
Kunming Iron and Steel Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kunming Iron and Steel Group Co Ltd filed Critical Kunming Iron and Steel Group Co Ltd
Priority to CN201410502275.5A priority Critical patent/CN104244290B/en
Publication of CN104244290A publication Critical patent/CN104244290A/en
Application granted granted Critical
Publication of CN104244290B publication Critical patent/CN104244290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a time-controllable IOS (internet work operating system) intranet reachability detecting system and method. The time-controllable IOS intranet reachability detecting system comprises a parameter setting module, an event monitoring module, a connection initializing module and a result analysis module. The method includes firstly setting parameters of reachability detection, monitoring broadcast of network state changes, initializing connection of a destination host, and finally analyzing information returned by connection initializing to obtain specific states of network connection. The advantage that network event broadcast in the system can be received by a Reachability database and the characteristic that time parameter of Socket asynchronous connection in C language is controllable is comprehensively utilized, so that accuracy in detection is guaranteed, and timeliness in detection is improved.

Description

The IOS Intranet accessible detecting System and method for that a kind of time is controlled
Technical field
The invention belongs to mobile internet technical field, be specifically related to controlled IOS Intranet accessible detecting System and method for of a kind of time.
Background technology
Along with the universal of intelligent terminal and application, increasing enterprise staff uses mobile terminal to carry out handling official business and internal communication, and thus, the data interaction of mobile terminal and corporate intranet is also just more and more.At present, application program in IOS system is nearly all use the Reachability storehouse carried in SDK for Intranet accessibility, the function provided in this storehouse can judge network connection status according to the target domain name of input and IP, and whether be the information such as WIFI or 3G network, in addition, when network state changes, system broadcasts can also be received.But the method is when being applicable in embody rule, there will be the overlong time that Sampling network cannot be communicated with, test result is about 15 seconds substantially, during this period of time, user usually thinks that network can reach, and does not occur with the reality of Intranet machine mutual after making concrete operations, then may cause the packet loss of data and the omission of operation, affect office efficiency, even possibility generation technique accident, affects the usefulness that enterprise produces.Therefore, develop a kind of Intranet accessible detecting system controlled based on the response time of IOS to be very important.
Summary of the invention
The first object of the present invention is the IOS Intranet accessible detecting system providing a kind of time controlled; Second object is the using method of the IOS Intranet accessible detecting system providing the described time controlled.
The first object of the present invention is achieved in that and comprises parameter setting module, action listener module, initiation link block, results analyses module, wherein:
Parameter setting module: for arranging the relevant parameter of accessible detecting;
Action listener module: for monitoring the broadcast of network state change;
Initiate link block: for setting up socket, and initiate the connection to destination host;
Results analyses module: be connected with initiation the information returned for the broadcast analyzed in action listener module, draw the concrete state that network connects.
The second object of the present invention is achieved in that and comprises the following steps:
A, parameter setting module initialization undetermined parameter, and the mode passing through man-machine interaction or program assignment, be delivered in undetermined parameter by design parameter numerical value;
B, action listener module monitor network state change events incessantly, once receive the broadcast of concern event, then call initiation link block;
C, initiation link block create the socket of non-blocking mode, and pass through the target machine of intranet in connect functional link optimum configurations, last according to the return time parameter in parameter setting module, whether which kind of state socket is in use select function check;
Broadcast type in D, analysis action listener module and the return state code of socket, obtain network reachability result.
Instant invention overcomes Reachability storehouse in the SDK of IOS and detect the problem of Intranet accessibility overlong time, the present invention utilizes objective-c can hybrid programming, and support the characteristic of complete C language Socket, comprehensive utilization Reachability storehouse can the advantage of network event broadcast in receiving system, the feature controlled with the time parameter of the asynchronous connection of Socket in C language, both ensure that the accuracy of detection, improve again the ageing of detection.
Accompanying drawing explanation
Fig. 1 is time of the present invention controlled IOS Intranet accessible detecting system schematic;
Fig. 2 is time of the present invention controlled IOS Intranet accessible detecting system flow schematic diagram.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further illustrated, but limited the present invention never in any form, and any conversion done based on training centre of the present invention or replacement, all belong to protection scope of the present invention.
The IOS Intranet accessible detecting system that time of the present invention is controlled, comprises parameter setting module, action listener module, initiates link block, results analyses module, wherein:
Parameter setting module: for arranging the parameter of accessible detecting;
Action listener module: for monitoring the broadcast of network state change;
Initiate link block: for setting up socket, and initiate the connection to destination host;
Results analyses module: be connected with initiation the information returned for the broadcast analyzed in action listener module, draw the concrete state that network connects.
Parameter described in parameter setting module comprises target domain name or address, gateway address and stand-by period.
Stand-by period described in parameter setting module is set to 5 seconds.
The broadcast of the network state change described in action listener module comprises, no net state and have the switching of net state broadcast, and the switching of wifi signal and 3G signal is broadcasted.
Initiating the socket described in link block is that asynchronous system creates, and it creates parameter and obtains from parameter setting module.
The concrete state that network described in results analyses module connects comprises wifi network and can reach, and 3G network can reach and unreachable three kinds of states.
The using method of the Intranet accessible detecting system based on IOS of the present invention, comprises the following steps:
A, parameter setting module initialization undetermined parameter, and the mode passing through man-machine interaction or program assignment, be delivered in undetermined parameter by design parameter numerical value;
B, action listener module monitor network state change events incessantly, once receive the broadcast of concern event, then call initiation link block;
C, initiation link block create the socket of non-blocking mode, and pass through the target machine of intranet in connect functional link optimum configurations, last according to the return time parameter in parameter setting module, whether which kind of state socket is in use select function check;
Broadcast type in D, analysis action listener module and the return state code of socket, obtain network reachability result.
The present invention to overcome in SDK Reachability storehouse for the problem of Intranet reachability test overlong time, provide a kind of accuracy high, ageing strong Intranet reachability test system, this system utilizes the hybrid programming mechanism of object-c, the advantage of comprehensive utilization Reachability storehouse and socket class, while Reachability storehouse accurately judges network state change events, asynchronously set up socket, attempt being connected with remote object, connection result is returned in official hour, last comprehensive analysis network state change events and connection return results, obtain the testing result of Intranet accessibility, for network interaction and the detection providing preposition property that communicates of application layer, reduce the invalid operation of application software in Intranet service as far as possible.
First method of the present invention arranges module initialization undetermined parameter, and these parameters comprise target domain name or address, gateway address and stand-by period etc., for follow-up method step provides parameter directs; Secondly, wifi and 3g network reachability event in Reachability storehouse is monitored in registration, detect current network by call back function during network change and whether be in networking state, now there are 2 kinds of possibilities: a network is in connected state as marked network can reach, but not at corporate intranet environment, two networks are in connected state, and are in corporate intranet environment simultaneously; Again, set up socket to prepare to initiate the connection to destination host, arranging this socket is non-blocking mode, if socket is blocking model, socket is when calling connect function and cannot connect immediately, and connect function there will be indefinite arrested state, and this accurately cannot obtain result under the state of mobile network's change, if socket is non-blocking mode, connect function creates socket at the Shi Zehui that cannot connect immediately in a kind of asynchronous mode and connects; Finally, by connect functional link Intranet, with select function check, whether socket is in a state be ready to complete, comprise read states and write state or abnormality, use the feature of select to be, it receives a time structure parameter, and this time structure can be as accurate as microsecond, be used for the maximum amount of control select complete operation, can the stand-by period be controlled.In addition, the present invention is in order to balancing user stand-by period acceptance and network reachability tolerance, the time parameter default setting of select is 5 seconds, mean that user can obtain notice at most after internal network accessibility loses efficacy 5 seconds, this notice is real-time, also meets the general characteristic of mobile network's application.
Feature of the present invention:
A. use Reachability storehouse in system, network event broadcast can be received timely and accurately, for accessible detecting is ready.
B. utilize the characteristic of C language Socket in system, in select function, arrange latency value, guarantee system gets testing result in controllable time.
C. the relation of balancing user stand-by period acceptance of the present invention and network reachability tolerance, is 5 seconds by the time parameter default setting in select.
As shown in Figure 2, this figure shows working-flow and realizes processing method, and concrete methods of realizing is as follows:
1, initialized target domain name or address, the system parameters such as gateway address and stand-by period;
2, the registration of network reachability event is monitored;
If the network event that 3 listen to concern, then initiate Intranet and connect and attempt;
4, obtain connection result and analyze;
If successful connection, then show that Intranet can reach, if connection failure, then show that Intranet is unreachable.

Claims (7)

1. the IOS Intranet accessible detecting system that the time is controlled, is characterized in that comprising parameter setting module, action listener module, initiating link block, results analyses module, wherein:
Parameter setting module: for arranging the parameter of accessible detecting;
Action listener module: for monitoring the broadcast of network state change;
Initiate link block: for setting up socket, and initiate the connection to destination host;
Results analyses module: be connected with initiation the information returned for the broadcast analyzed in action listener module, draw the concrete state that network connects.
2. the IOS Intranet accessible detecting system that the time according to claim 1 is controlled, is characterized in that the parameter in described parameter setting module comprises target domain name or address, gateway address and stand-by period.
3. the IOS Intranet accessible detecting system that the time according to claim 2 is controlled, is characterized in that the stand-by period in described parameter setting module is set to 5 seconds.
4. the IOS Intranet accessible detecting system that the time according to claim 1 or 3 is controlled, it is characterized in that the broadcast of the network state change in described action listener module comprises: no net state and have the switching of net state broadcast, the switching of wifi signal and 3G signal is broadcasted.
5. the IOS Intranet accessible detecting system that the time according to claim 1 is controlled, it is characterized in that the socket in described initiation link block is that asynchronous system creates, it creates parameter and obtains from parameter setting module.
6. the IOS Intranet accessible detecting system that the time according to claim 1 is controlled, it is characterized in that the concrete state of the network connection in described results analyses module comprises wifi network and can reach, 3G network can reach and unreachable three kinds of states.
7. a using method for the arbitrary described IOS Intranet accessible detecting system of claim 1 ~ 6, is characterized in that comprising the following steps:
A, parameter setting module initialization undetermined parameter, and the mode passing through man-machine interaction or program assignment, be delivered in undetermined parameter by design parameter numerical value;
B, action listener module monitor network state change events incessantly, once receive the broadcast of concern event, then call initiation link block;
C, initiation link block create the socket of non-blocking mode, and pass through the target machine of intranet in connect functional link optimum configurations, last according to the return time parameter in parameter setting module, whether which kind of state socket is in use select function check;
Broadcast type in D, analysis action listener module and the return state code of socket, obtain network reachability result.
CN201410502275.5A 2014-09-27 2014-09-27 A kind of controllable IOS Intranet accessible detecting System and method fors of time Active CN104244290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410502275.5A CN104244290B (en) 2014-09-27 2014-09-27 A kind of controllable IOS Intranet accessible detecting System and method fors of time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410502275.5A CN104244290B (en) 2014-09-27 2014-09-27 A kind of controllable IOS Intranet accessible detecting System and method fors of time

Publications (2)

Publication Number Publication Date
CN104244290A true CN104244290A (en) 2014-12-24
CN104244290B CN104244290B (en) 2018-04-17

Family

ID=52231455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410502275.5A Active CN104244290B (en) 2014-09-27 2014-09-27 A kind of controllable IOS Intranet accessible detecting System and method fors of time

Country Status (1)

Country Link
CN (1) CN104244290B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360059A (en) * 2017-07-28 2017-11-17 广东欧珀移动通信有限公司 Network detecting method, network detection means and intelligent terminal
CN107733744A (en) * 2017-11-30 2018-02-23 北京酷我科技有限公司 A kind of method of iOS network real-time monitorings
CN108696537A (en) * 2018-07-09 2018-10-23 武汉斗鱼网络科技有限公司 Long connection network data distribution and processing method and system in IOS systems

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224376A1 (en) * 2005-04-05 2006-10-05 Cisco Technology, Inc. Method and system for emulation of an internetwork operating system device
CN103546487A (en) * 2013-11-05 2014-01-29 无锡成电科大科技发展有限公司 Mobile office device based on IOS platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060224376A1 (en) * 2005-04-05 2006-10-05 Cisco Technology, Inc. Method and system for emulation of an internetwork operating system device
CN103546487A (en) * 2013-11-05 2014-01-29 无锡成电科大科技发展有限公司 Mobile office device based on IOS platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHENGYAKUN11: "IOS监测网络连接状态", 《博客》 *
KEN0608: "如何设置socket的connect超时", 《博客》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360059A (en) * 2017-07-28 2017-11-17 广东欧珀移动通信有限公司 Network detecting method, network detection means and intelligent terminal
CN107733744A (en) * 2017-11-30 2018-02-23 北京酷我科技有限公司 A kind of method of iOS network real-time monitorings
CN108696537A (en) * 2018-07-09 2018-10-23 武汉斗鱼网络科技有限公司 Long connection network data distribution and processing method and system in IOS systems
CN108696537B (en) * 2018-07-09 2020-10-16 武汉斗鱼网络科技有限公司 Long connection network data distribution and processing method and system in IOS system

Also Published As

Publication number Publication date
CN104244290B (en) 2018-04-17

Similar Documents

Publication Publication Date Title
CN108139964B (en) Cloud service configuration method and device, storage medium and cloud service system
CN106911523B (en) The method and system that mobile interchange network users are positioned by LTE indulging in the internet
CN103686813B (en) Device and method for testing automatic switching stability of wireless AP (access point) channel
CN105659533A (en) Subscriber tracing in communications
CN104796298A (en) SDN (Software Defined Network) network fault analyzing method and device
CN102378162B (en) The system and method for M2M terminal, M2M terminal remote management
CN102571492B (en) Method and device for detecting failure of routing equipment
CN107979497B (en) Automatic configuration method and device
CN113422794A (en) Traffic recording and playback processing method and device and electronic equipment
CN104244290A (en) Time-controllable IOS (internet work operating system) intranet reachability detecting system and method
CN102045397A (en) Method and equipment for logining embedded terminals by using Telnet to debug embedded terminals
CN106095682A (en) Android application stability test method for simulating complex network
CN107508725A (en) For the method for automatic test, apparatus and system
CN109802842B (en) Application topology generation method and related equipment
CN113422697A (en) Tracking method, device, electronic equipment and readable storage medium
CN112702219A (en) Internet of things network monitoring method, device, equipment and storage medium
CN104639351A (en) Processing system and method for constructing network structure deployment diagram
CN110034979A (en) A kind of proxy resources monitoring method, device, electronic equipment and storage medium
CN107888394B (en) Method and device for positioning network fault reason
CN112995042A (en) Method, device and equipment for generating service topological graph and storage medium
CN105373474A (en) Business system-oriented test method and device
CN105306278B (en) The system and method for PING network diagnosises is realized based on embedded Web webmaster
CN105704153B (en) Method and system for tracking network access information in real time
CN104270431A (en) Method and device for concurrency control
CN108363922A (en) A kind of automation malicious code emulation detection method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant