This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disconnect SocketConnection on Handspring

 
Chris Bilinski
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a problem with phisically disconnecting wireless ethernet card from MIDlet. I'm using Handspring Visor Neo with Xircom Wireless Ethernet Module.
Here is part of code:
StreamConnection c = null;
DataInputStream socketIn = null;
DataOutputStream socketOut = null;

c = (StreamConnection)Connector.open(serverUrl, Connector.READ_WRITE, true);
socketOut = c.openDataOutputStream();
socketIn = c.openDataInputStream();

// reading and writing data
//---------- finalize ----------

try {
socketIn.close();
socketOut.close();
c.close();
c = null;
System.gc();
} catch (IOException e) {

}

The problem is, that when I close the connection, the Xircom card is still acting and the only way I can put it in "standby mode" is to choose "disconnect" from MIDlet menu.
Is there any other way to do it? Please help me, it is urgent.
Chris Bilinski
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic