File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java Micro Edition and the fly likes Disconnect SocketConnection on Handspring Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Reply Bookmark "Disconnect SocketConnection on Handspring" Watch "Disconnect SocketConnection on Handspring" New topic
Author

Disconnect SocketConnection on Handspring

Chris Bilinski
Greenhorn

Joined: Sep 06, 2001
Posts: 9
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
 
 
subject: Disconnect SocketConnection on Handspring
 
Threads others viewed
the trouble of openInputStream()!
write to serial port ?
ConnectionNotFoundException please help
Reading MAC address
MulticastSocket simply hangs on receive()
IntelliJ Java IDE