Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > StreamConnectionNotifier

Reply
Thread Tools

StreamConnectionNotifier

 
 
Eugeniusz Hetmanski
Guest
Posts: n/a
 
      05-17-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
StreamConnection / StreamConnectionNotifier problem. Boki Java 2 11-08-2005 06:57 PM
[J2ME] StreamConnectionNotifier.acceptAndOpen() cancellation JScoobyCed Java 0 08-23-2004 03:27 AM



Advertisments