determine succesful connection socket

Hi how can i determine if a user has succesfuly connected to a socket connection?

i have the following code below that opens a socket and creates input/putput streams. thanks in advance

publicvoid open()

{

try

{

server = (SocketConnection) Connector.open(url);

is = server.openInputStream();

os = server.openOutputStream();

}

catch(Exception e)

{

e.printStackTrace();

}

}

[752 byte] By [jonney69a] at [2007-11-27 2:48:29]
# 1
Hi, If you catch an exception then you don't have the connection.Jack
jack@square6a at 2007-7-12 3:18:58 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
the problem is that nothing is catched when i test it on an actual fone
jonney69a at 2007-7-12 3:18:58 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Correction: you don't see anything if the exception is launched in the actual phone.
jack@square6a at 2007-7-12 3:18:58 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
But if i create an error alert screen inside the catch block will that appear?
jonney69a at 2007-7-12 3:18:58 > top of Java-index,Java Mobility Forums,Java ME Technologies...