i am writing program for chat room on client side i had wirtten
clientSocket = new Socket('127.0.0.1',5432);
socketInputBuffer = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));
socketOutputBuffer = new BufferedWriter(new OutputStreamWriter(clientSocket.getOutputStream()));
systemBuffer = new BufferedReader(new InputStreamReader(System.in));
and on server side
sock = new ServerSocket(5432)
;
and socketinputbuffer
and socketoutputbuffer
as written in client
now in above code connection is properly established after that from server side i write in socket stream which i will be reading on the client.
but client waits for server to complete its writing. but when i use shutdownoutput on server it writes and client is able to read properly but same problem occurs when client writes. so i used shutdown output at client also. beacuse of this i am unable to send data next time pls suggest me any method so that client and server should work properly
i am writing using [CODE] socketOutputBuffer.write("Enter Your Name"); socketOutputBuffer.flush(); [/CODE] still not working.