Tuesday, February 7, 2012

Client Thread

The client thread curently has:
** constructor (Handler mHandler, BluetoothAdapter mAdapter,
RouterObject mRouter )
** public void run()

The constructor takes the three arguments and sets the values to private variables.

Run is as follows:
the thread continuously runs until an interrupt is given, and first gets a list of paired devices.
For each paired device, it attempts to create a client socket. If that's successful, it then attempts to connect to a server socket. If that is successful, the connected socket is then passed to the Router Object to be handled.

No comments:

Post a Comment