×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    22

    Socket listening problem

    Hi genius out there! I am new to pys60! I am trying to make a connection to listen to a port and capture the data as soon as it receives it. I have searched a lot but any of the codes are working! ..Please help me out!

    Thank you a lot!!

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Socket listening problem

    Quote Originally Posted by darklord18 View Post
    Hi genius out there! I am new to pys60! I am trying to make a connection to listen to a port and capture the data as soon as it receives it. I have searched a lot but any of the codes are working! ..Please help me out!

    Thank you a lot!!
    hi darkload18
    welcome to the wonderful python Dibo. I hope u will get all answers in this forum.
    before u can start socket programming have a look at the wiki
    u will get all the code snippets there.
    thanx.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    22

    Re: Socket listening problem

    Thx for the reply. I check out the website. It is really good, but it is still not working.


    I have used this code:

    from socket import *
    >>> s = socket(AF_INET, SOCK_STREAM)
    >>> s.bind(('127.0.0.1', 8080))
    >>> s.listen(1)


    to listen to anyone wanting to connect to me.

    I get this error:

    in bind error(2.'No such file or directory').

    Please help me out!

    Thank you a lot!!

  4. #4
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Socket listening problem

    Quote Originally Posted by darklord18 View Post
    Thx for the reply. I check out the website. It is really good, but it is still not working.


    I have used this code:

    from socket import *
    >>> s = socket(AF_INET, SOCK_STREAM)
    >>> s.bind(('127.0.0.1', 8080))
    >>> s.listen(1)


    to listen to anyone wanting to connect to me.

    I get this error:

    in bind error(2.'No such file or directory').

    Please help me out!

    Thank you a lot!!
    I wrote the code in the interactive console exactly as you provided it and didn't get any errors. Strage.

  5. #5
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Socket listening problem

    hi darkload18
    here is the same case as of bogdan i also tried the same code in my interactive console and didnt get any error.
    really surprised

  6. #6
    Registered User
    Join Date
    Apr 2008
    Posts
    22

    Re: Socket listening problem

    Try using another IP address, it does not work. But when it executes the listen command, it should not connect to the access point?? It does nothing!

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Socket listening problem

    Quote Originally Posted by darklord18 View Post
    Try using another IP address, it does not work. But when it executes the listen command, it should not connect to the access point?? It does nothing!
    hi darkload
    that means ur code is working upto listen(). there can be a GPRS connection problem.
    plz give feedback

  8. #8
    Regular Contributor
    Join Date
    Jan 2004
    Location
    Helsinki
    Posts
    376

    Re: Socket listening problem

    You cannot listen to incoming Internet connections. IP address 127.0.0.1 (localhost) will allow only in-phone interprocess connections.

    GPRS connections do not have public IP addresses. Please refer to the tunnel message posted here recently.

    You can use WLAN access point and WLAN internal IP for listening to connections from external devices.
    Mikko Ohtamaa

    http://mfabrik.com
    http://blog.mfabrik.com

Similar Threads

  1. socket and datagram problem
    By metebalci in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2006-08-12, 15:42
  2. Problem of socket connection with N70
    By isa550 in forum Mobile Java Networking & Messaging & Security
    Replies: 8
    Last Post: 2006-07-12, 14:10
  3. problem in persistant socket connection
    By poms4symbian in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-03, 13:23
  4. TCP/IP socket connection problem
    By ArunP in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2002-09-19, 10:09

Posting Permissions

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