Hello Everyone,
Following is the code i am facing problem to understand. Here we are making 2 threads from the 'main'
thread , which contains Input Stream & Output Stream of the Socket respectively.
Now when i run both files (ie. server side & client side) & try to send data from server to client through console , following is the output of the server
Question1. On the 7th line of the output , when the 'Server Input Thread' stops executing & the 'main' thread comes in 'Waiting for Client to connect...' gets printed by the main thread, then why doesnt the next line ' Client connected. IP: /192.168.1.15' got printed. Is it because at that perticular time 'Server Input Thread' started executing ?
Question2. When i sent 'Hello Client'...Everything goes fine but when i enter 'Tarun' , then why doesnt the following gets print before printing 3 ?
"2 Current Thread is : Server Output Thread
AFTER TAKING INPUT FROM CONSOLE "
Thanks In Advance!!!