DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    claudio Guest

    I need your help about Socket.


    Hi, I have a problem about socket. I'm using this source:

    BufferedReader inStream;
    inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));


  2. #2
    Rajkamal Gopinath Guest

    Re: I need your help about Socket.


    Hi,

    Make sure the other end of Socket is flushing the Characters after you write
    character to the Outputstream...

    The InputStream can only receive the data only when the output is sent..from
    the connected socket.. and since you are using Buffered Systems.. it hangs
    on for the other end...

    Regards

    Rajkamal





    "claudio" <claudio.zamboni@dierre.it> wrote:
    >
    >Hi, I have a problem about socket. I'm using this source:
    >
    >BufferedReader inStream;
    >inStream = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    >
    >.
    >.
    >System.out.println(inStream.readLine()); /*it stops here, it's waiting for
    >*/
    >system.out.println("prova"); // this isn't execute.
    >.
    >.
    >How can i read a line from socket and go on with next step?
    >Thank you.
    >Claudio
    >
    >
    >



Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links