Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > StreamConnectionNotifier

Thread Tools


Eugeniusz Hetmanski
Posts: n/a
Hi all,
in 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) 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???

Reply With Quote

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