E
Eugeniusz Hetmanski
Hi all,
in javax.microedition.io exist interface Notifier with method acceptAndOpen.
I've one question. how long this method wait for connection??? and if
his not capable open the socket what its return???
And in this example:
StreamConnectionNotifier notifier =
(StreamConnectionNotifier)Connector.open( url );
// Wait on someone to connect
StreamConnection con = (StreamConnection) notifier.acceptAndOpen();
// the code after notifier.acceptAndOpen() will execute only after
opening socket????
// open input stream
Input Stream is = con.openInputStream();
// open output stream
OutputStream os = con.openOutputStream();
So the program wait for establish connection??? so, how long?? and how
can I detect error???
Thank
Eugeniusz
in javax.microedition.io exist interface Notifier with method acceptAndOpen.
I've one question. how long this method wait for connection??? and if
his not capable open the socket what its return???
And in this example:
StreamConnectionNotifier notifier =
(StreamConnectionNotifier)Connector.open( url );
// Wait on someone to connect
StreamConnection con = (StreamConnection) notifier.acceptAndOpen();
// the code after notifier.acceptAndOpen() will execute only after
opening socket????
// open input stream
Input Stream is = con.openInputStream();
// open output stream
OutputStream os = con.openOutputStream();
So the program wait for establish connection??? so, how long?? and how
can I detect error???
Thank
Eugeniusz