×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    8

    Terminate GPRS Connections

    Hi All,

    I've written a simple app that allows you to select a set of connection settings and then downloads a file using those settings and reports the time/speed taken. However I'd like to be able to kill the connection off so that you can then select a new default ap and have it use that. I'm using the socket.set_default_access_point(apo) code to set the default access point but is there anyway I can force the app to terminate the conenction once I'm done. If I exit python the connection closes quickly but I'd rather not have to restart python everytime.

    TIA
    Sam

  2. #2
    Super Contributor
    Join Date
    May 2006
    Location
    Oulu, Finland
    Posts
    622

    Re: Terminate GPRS Connections

    Hi sammachin,

    Check the doc there are few examples:
    Code:
    #access point is selected from the list
    apid = select_access_point()
    apo = access_point(apid)
    set_default_access_point(apo)
    s = socket(AF_INET, SOCK_STREAM)
    print apo.ip()
    s.connect((’www.sourceforge.net’,80))
    s.send(’GET /\r\n\r\n’)
    s.recv(100)
    s.close()
    apo.stop()
    Should be what you need.

    LFD
    Devices:
    Nokia E61 3rd Edition - pys60 1.4.0

    Tips and modules:
    http://www.lfdm.net/thesis

Similar Threads

  1. Limit on the number of socket and simultaneous GPRS connections??
    By mayur_24 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2005-10-13, 11:02
  2. Limit on the number of socket and simultaneous GPRS connections??
    By mayur_24 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-10-13, 08:21
  3. Voice & Data (GPRS) connections
    By bmk007 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2005-09-14, 16:42
  4. Monitoring GPRS connections using RConnection
    By acar3 in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-07-01, 16:19
  5. 2 GPRS connections to a WAP gateway
    By jiaoyang in forum WAP Servers
    Replies: 1
    Last Post: 2002-06-20, 12:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×