I need your help about Socket.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: I need your help about Socket.

  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
    >
    >
    >



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