Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Server socket programming and thread

843790Feb 16 2007 — edited Feb 17 2007
hello,
briefly this is what i have sought out to do : the server waits for the client indefinitely,upon a client requesting for service by writing a service id into the socket, a new thread of the type id as read by the server which is a sub-class of the Server (main-class) is exec'd.

the problem as i understand is that the client can send as much of data as it desires to the server and the thread can read the data it receives by the clients.the server(thread) fails to write reply to the client;eventhough out.write() is successful;the client is blocked in read() indefinitely.is it because of the thread which runs at a different port the client does not know and the server is not redirecting response to the client.
how do i read what the server(thread) writes onto the socket from the clients.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 17 2007
Added on Feb 16 2007
6 comments
137 views