StreamConnectionNotifier

Discussion in 'Java' started by Eugeniusz Hetmanski, May 17, 2004.

  1. 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
     
    Eugeniusz Hetmanski, May 17, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JScoobyCed
    Replies:
    0
    Views:
    3,243
    JScoobyCed
    Aug 23, 2004
  2. Boki
    Replies:
    2
    Views:
    2,764
Loading...

Share This Page