Problems with sockets and InputsStreams


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Problems with sockets and InputsStreams

  1. #1
    Join Date
    Jun 2005
    Posts
    1

    Post Problems with sockets and InputsStreams

    Hi,

    I ve this code:

    InputStream is = null;
    //sc is an object instance of socketConnection
    is = sc.openInputStream();
    this.parse(is);
    is.close();

    ----

    and this exception is produced:
    java.io.IOException: no more Input Streams available.
    This exception is produced in the line:
    is = sc.openInputStream();

    I m connecting to a server and this server sends data throw a socket... but the problem is that when i m reading from this socket and this socket doesn t have data in it... or other problem i don t understand
    how could i solve this problem...?

    Thanks in advance,
    Diego

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    It looks mostly like a Java question to me. The C socket APIs I know work slight different anyway, so I guess the problem you're encountering has to do with something that is specific to Java. Therefore, I'm forwarding it to the Java forum, leaving a copy here as well.
    Danny Kalev

  3. #3
    Join Date
    Jun 2005
    Posts
    4

    Thumbs up Reading and writing to sockets

    Hi,

    Please follow the following link :

    http://java.sun.com/docs/books/tutor...ngWriting.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center