Socket program, cannot read untill I reopen the port.
1 posts in topic
Flat View  Flat View

Posted By:   Ganesh_Gavara
Posted On:   Monday, June 18, 2001 12:15 PM

I am opening a socket through tcp/ip connection using socket method. I am sending out a output stream and when I try to read the data. I am not receiving data. when I close and reopen the socket I can read the data. if somebody there has any experiece please let me know how to write and read data in one connection.

Thank in advance
Ganesh Gavara

Re: Socket program, cannot read untill I reopen the port.

Posted By:   Tim_Rohaly  
Posted On:   Wednesday, June 27, 2001 11:56 AM

I suggest you read the Java Tutorial Networking Trail - the URL
is on the right. It is clearly your code that is wrong here.
My guess is that you are not implementing
your protocol properly - either the server is blocking waiting
for additional information from you before it responds, or
your write() operation is blocking because you have
sent the server more data than it expects. Reading and
writing are both blocking operations.
About | Sitemap | Contact