×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    31

    How to make socket connection without timeout?

    I tried to make a client socket connection but i always have the same error 60 "Operation timed out". I tried to put several timeouts and a None value, and setblocking to true. But ever the same error.

    I need a client socket sending data for EVER.

    My code is:

    Code:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    #s.settimeout(3600*24) # In seconds. One attempt
    #s.settimeout(None) # Other attempt
    #s.setblocking(1) # Other attempt
    s.connect((HOST, PORT))
    total_sent = s.send(self.data)
    s.close()
    Last edited by romantr; 2010-10-19 at 12:41.

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: How to make socket connection without timeout?

    See this discussion about settimeout() : http://discussion.forum.nokia.com/fo...ght=settimeout

    In 1.9.0 you can set timer using this function but not in older version.

    Best regards,

  3. #3
    Registered User
    Join Date
    Aug 2008
    Posts
    31

    Re: How to make socket connection without timeout?

    I´m using PyS60 2.0 on N96, and i get connection for several minutes but then the app throws this error.

  4. #4
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Re: How to make socket connection without timeout?

    It should work.

    Have a look here : settimeout theory

    Best regards,

  5. #5
    Registered User
    Join Date
    Aug 2008
    Posts
    31

    Re: How to make socket connection without timeout?

    I think this is not the problem. I think the problem is thread synchronization, see my entired code here I fixed the funcionality by other way but i do not know why my code failed.

Similar Threads

  1. Replies: 7
    Last Post: 2009-01-16, 15:05
  2. socket timeout
    By feikekramer in forum Symbian
    Replies: 6
    Last Post: 2008-10-24, 07:22
  3. TCP Socket connection with timeout
    By tinkywinky in forum Symbian
    Replies: 2
    Last Post: 2008-10-02, 03:32
  4. how make socket or udp connection on 3650
    By balaji2003 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2003-07-23, 14:53
  5. how make socket or udp connection on 3650
    By balaji2003 in forum Mobile Java General
    Replies: 0
    Last Post: 2003-07-23, 14:47

Posting Permissions

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