Revision as of 19:22, 24 August 2008 by kiran10182 (Talk | contribs)

Archived:How to close an active GPRS Connection

From Nokia Developer Wiki
Jump to: navigation, search


The small code snippet below shows how to stop an active GPRS connection manually. This is a very useful code snippet when we are developing applications related to networking in PyS60. The access point (access_point) object of the socket module mainly serves three purposes:

  • We can start a GPRS connection and select a default Access point.
  • We can stop or disconnect manually an active GPRS connection. The Code for this function is given below:

Code Snippet

import socket   #imports the Module
apid = socket.select_access_point()
ap = socket.access_point(apid)
ap.start() # start an GPRS connection
ap.stop() # stops an GPRS connection
76 page views in the last 30 days.