Ignore:
Timestamp:
04/07/12 08:48:34 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Implemented better connection and connection failure handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fs.py

    r27 r59  
    44
    55import const
     6
     7import fsuipc
    68
    79#-------------------------------------------------------------------------------
     
    1315        simulator of the given type."""
    1416        print "fs.ConnectionListener.connected, fsType:", fsType, ", descriptor:", descriptor
     17
     18    def connectionFailed(self):
     19        """Called when the connection could not be established."""
     20        print "fs.ConnectionListener.connectionFailed"       
    1521
    1622    def disconnected(self):
     
    3440    assert type in [const.SIM_MSFS9, const.SIM_MSFSX], \
    3541           "Only MS Flight Simulator 2004 and X are supported"
    36     import fsuipc
    37     return fsuipc.Simulator(connectionListener)
     42    return fsuipc.Simulator(connectionListener, connectAttempts = 3)
    3843
    3944#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.