StreamConnectionNotifier

  • Thread starter Eugeniusz Hetmanski
  • Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top