CN1561077A - Moble terminal data communication method - Google Patents

Moble terminal data communication method Download PDF

Info

Publication number
CN1561077A
CN1561077A CNA2004100236932A CN200410023693A CN1561077A CN 1561077 A CN1561077 A CN 1561077A CN A2004100236932 A CNA2004100236932 A CN A2004100236932A CN 200410023693 A CN200410023693 A CN 200410023693A CN 1561077 A CN1561077 A CN 1561077A
Authority
CN
China
Prior art keywords
socket
data
port
application
portable terminal
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.)
Pending
Application number
CNA2004100236932A
Other languages
Chinese (zh)
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.)
Hisense Group Co Ltd
Qingdao Hisense Communication Co Ltd
Original Assignee
Hisense Group Co Ltd
Qingdao Hisense Communication 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 Hisense Group Co Ltd, Qingdao Hisense Communication Co Ltd filed Critical Hisense Group Co Ltd
Priority to CNA2004100236932A priority Critical patent/CN1561077A/en
Publication of CN1561077A publication Critical patent/CN1561077A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Telephonic Communication Services (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

This invention discloses a method for mobile terminal data communication including opening a network base to assign an applied id to the terminals, utilizing the id to open ppp connection and set up two or more sockets binded with a different corresponding port each, when a terminal dials an IP phone call, it can use an id to set up three sockets and bind them to different ports to carry out related data sending and receiving by different ports which saves resources of mobile terminals.

Description

The mobile terminal data method for communicating
Technical field
The invention belongs to the mobile communication technology field, relate to a kind of mobile terminal data method for communicating in particular.
Technical background
Portable terminal carries out data communication by aerial transmission and base station server, and socket is present between the transport layer and application layer of data communication.The corresponding translation of the Chinese of socket is a socket, and it has encapsulated the agreement of bottom, and the interface of communicating by letter between application layer and the transport layer is provided.By socket, can carry out the request that portable terminal receives collection site server data, also can carry out the request that mobile terminal data sends to base station server.
As shown in Figure 1: when portable terminal sends data to server, application layer is passed to socket to the data that needs send earlier, socket calls the API of encapsulation, and (application interface: application programming interfaces) the function data that will send are relayed from level to level through transport layer, network layer and data link layer, up to physical layer data are sent out.When data that the portable terminal reception server sends, transport layer has detected data and has come, and the api function notice application layer of just calling the socket encapsulation has data to come, and the api function of application layer by the socket encapsulation is with Data Receiving.
The method of generally setting up socket is to open network library earlier, obtains to use id, gives this id network call back function of registration and socket call back function then.Wherein the network call back function is used for handling network event, and to go up the incident of reading or writing that takes place be that Data Receiving or data send incident and the socket call back function is used for handling socket.Open ppp (point-to-point protocol) by this application id then and connect, it is that portable terminal and server negotiate are opened that ppp connects, and the result of negotiation notifies portable terminal by the network call back function.After ppp consulted successfully to finish, server was given ip address of portable terminal Random assignment.So just make server or other portable terminals can find this portable terminal.Utilize this application id to set up a socket at last again, and this socket and a port bound, socket read or write operation is just undertaken by this correspondence port.When bottom detects is to read or the incident of writing when taking place the just operation of notifying upper layer application to read or write by the socket call back function.
When the portable terminal calling IP phone, having used the sip agreement on the portable terminal is conversation initialized protocol, the rtp agreement is that RTP and rtcp agreement are RTCP Real-time Transport Control Protocol, these three agreements all belong to the agreement of application layer, in order to communicate with underlying protocol, need set up 3 socket and connect, be i.e. Sip socket, rtp socket and rtcp socket.The method of taking in the portable terminal is that each uses the corresponding socket of id at present, as shown in Figure 2, open network library earlier, obtain to use id, open ppp (point-to-point protocol) by this application id then and connect, and then utilize this application id to set up socket, and socket and a port bound, owing to need set up 3 socket, so said process will repeat 3 corresponding 3 application id of socket 3 times.
This method is easy to realize, but the shortcoming that exists is to take that to use id too much, the waste resource.Only support 3 to use id on the software platform of some portable terminals, the IP phone of mobile phone is used and is just used up 3 and use id, so just can not increase for example WAP and the email application in the mobile phone of other data communication applications again.
Summary of the invention
Purpose of the present invention, just be to overcome above-mentioned shortcoming and defect, a kind of way of mobile terminal data communication is provided, use id with one and come corresponding three socket, each socket binds a port respectively, and 3 ports are different, portable terminal and server carry out data communication, can either guarantee that data are normal receives and transmit operation, has also saved the precious resources of portable terminal, can increase other data communication applications for example WAP and the email in the mobile phone use.
To achieve these goals, the present invention includes and open network library, utilize id to open the PPP step of connecting, it is characterized in that further comprising the steps of to the step that portable terminal distributes an application id:
Utilize this id to set up the socket of two or more quantity;
Corresponding port of each socket binding, different between the port;
Carrying out corresponding data by port sends and Data Receiving.
During the portable terminal calling IP phone, can utilize an application id to set up three socket, be respectively Sip socket, rtp socket and rtcp socket, and they are bound a mutually different port respectively, utilize different ports to carry out corresponding data transmission and Data Receiving operation.
Description of drawings
Below in conjunction with drawings and Examples the present invention is further described.
Fig. 1 is the communication of mobile terminal schematic network structure;
Fig. 2 uses the flow chart that id sets up a socket for one of portable terminal;
Fig. 3 uses the flow chart that id sets up three socket for one of the present invention;
Fig. 4 is the schematic diagram of an id of data communication applications of the present invention.
Embodiment
Embodiment 1, IP mobile telephone and server carry out data communication, need to use the sip agreement initializtion protocol of promptly replying on the mobile phone, the rtp agreement is that RTP and rtcp agreement are RTCP Real-time Transport Control Protocol, these three agreements all belong to the agreement of application layer, in order to communicate with underlying protocol, need to set up 3 socket and connect, be Sip socket, rtp socket and rtcp socket.
As shown in Figure 3, at first open network library, network library uses id for one of handset allocation, each uses id all will register a network call back function and a socket call back function, be used for monitoring network event and socket incident respectively, when having network event or socket incident to take place, just call corresponding call back function.Utilize this application id to open ppp then and connect, know by the network call back function whether ppp correctly opens, after ppp correctly opened, server was given ip address of portable terminal Random assignment.Utilize this application id to set up three socket again, i.e. Sip socket, rtp socket and rtcp socket, and they and mutually different port are bound.So just can carry out normal data transmission and Data Receiving operation.
Because we only use id with one, therefore the application id of three socket is identical, so the network call back function of three socket is exactly the same with the socket call back function.Therefore, needing to distinguish in network call back function and socket call back function is on which socket communication event to have taken place.
As shown in Figure 4, Sip socket, 3 socket of rtp socket and rtcp socket are bundling port 1, port 2 and port 3 respectively, use id for corresponding altogether one, the relatively good processing of network call back function, because have only one to use id, therefore only open a ppp and connect, only need judge according to network condition.In the socket call back function, we distinguish different socket with the socket identifier as sign, and the identifier of Sip socket is 200, and the identifier of rtp socket is 201, and the identifier of rtcp socket is 202.Because the port that each socket bound is different, so when the incident of reading or writing took place, we just can find corresponding socket identifier by the port that incident takes place, thereby judge it is which socket goes up event, and know and read or write incident
Forwarding corresponding processing function then to handles.After for example entering conversation, when bottom detects that event occurs, call the socket call back function, finding identifier by port 2 is 201 rtpsocket, and finding is the read data incident of rtp, calls the rtp receiver function then and goes to receive the rtp data.
Embodiment 1 has guaranteed normal reception of IP phone data and transmit operation, has also saved the precious resources of portable terminal, is reduced to by 3 application ID that need in the present technology to use and only uses 1 to use ID.

Claims (3)

1, a kind of mobile terminal data method for communicating comprises that opening network library distributes a step of using id to portable terminal, utilizes id to open the PPP step of connecting, it is characterized in that further comprising the steps of:
Utilize this id to set up the socket of two or more quantity;
Corresponding port of each socket binding, different between the port;
Carrying out corresponding data by port sends and Data Receiving.
2, mobile terminal data method for communicating according to claim 1 is characterized in that utilizing an application id to set up three socket.
3, mobile terminal data method for communicating according to claim 2 is characterized in that three socket are Sip socket, rtp socket and rtcp socket.
CNA2004100236932A 2004-03-12 2004-03-12 Moble terminal data communication method Pending CN1561077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2004100236932A CN1561077A (en) 2004-03-12 2004-03-12 Moble terminal data communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2004100236932A CN1561077A (en) 2004-03-12 2004-03-12 Moble terminal data communication method

Publications (1)

Publication Number Publication Date
CN1561077A true CN1561077A (en) 2005-01-05

Family

ID=34441122

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2004100236932A Pending CN1561077A (en) 2004-03-12 2004-03-12 Moble terminal data communication method

Country Status (1)

Country Link
CN (1) CN1561077A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212472B (en) * 2006-12-31 2011-12-21 乐金电子(中国)研究开发中心有限公司 Method for enabling mobile terminals to establish a plurality of point-to-point connections
WO2012174750A1 (en) * 2011-06-24 2012-12-27 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for controlling network access of applications
WO2017096909A1 (en) * 2015-12-11 2017-06-15 小米科技有限责任公司 Data connection establishing method and apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101212472B (en) * 2006-12-31 2011-12-21 乐金电子(中国)研究开发中心有限公司 Method for enabling mobile terminals to establish a plurality of point-to-point connections
WO2012174750A1 (en) * 2011-06-24 2012-12-27 宇龙计算机通信科技(深圳)有限公司 Method, system and mobile terminal for controlling network access of applications
WO2017096909A1 (en) * 2015-12-11 2017-06-15 小米科技有限责任公司 Data connection establishing method and apparatus

Similar Documents

Publication Publication Date Title
CN100544390C (en) A kind of data method for pushing and system
CN1276636C (en) Method and equipment for executing common calling management by common software platform
CN103188300B (en) The methods, devices and systems of VOIP phone are realized in cloud computing environment
CN101478835B (en) VoWLAN system based on 1X EvDO-WiFi wireless router
CN1404288A (en) Cellphone number and instant communication number bundling and cellphone state display method
CN1784056A (en) Short message service (SMS) remote control system and method of mobile communication terminal
CN1188983C (en) Method of altering network equipment IP address via network managing equipment
CN103281797A (en) Mobile terminal and method of transmitting business data by same
CN102118448A (en) Method, system and terminal for realizing cloud computing
CN101931663B (en) Method capable of dynamically setting domain name server and wireless communication terminal
CN107147543A (en) A kind of socket communication means of server towards pc client
CN1780334A (en) Remote testing device and method for telephone connection service of mobile communication terminals
CN103052170A (en) Mobile phone network shared service-based network connection method and mobile phone
CN1602612A (en) System for transferring information in a wireless data communication network
CN1561077A (en) Moble terminal data communication method
CN102223625A (en) Wireless communication method suitable for multi-mode mobile terminal
CN114143144A (en) Distributed gateway-based micro-service calling method and device and related equipment
CN102868985A (en) Call forwarding method of mobile terminal
CN1445974A (en) Method for automatic transferring name cards through communication with mobile telephone
CN101753399B (en) Method for implementing interworking of video conference terminals and gatekeeper therefor
CN2904496Y (en) Internet telephone switching device
CN1878128A (en) Mobile audio/video data transmission method
CN1266915C (en) Method for initiating telephone call via E-mail
CN1795655A (en) A method for updating session initiation information in connection with a telephone call and a terminal device using the method
CN107438235A (en) Incoming call transfer method, system, terminal and computer-readable recording medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication