I've been working on a socket program to connect to a server to send some commands. and total programming is in java. It's actually like this, I have four java classes one Login,ready,Notready, and Logout. when I run login program then successfully connects to server and after login I run quickly Ready program and it works. but when I run Ready program after 3,4 second after Login, Ready program through an Error : Resource in Logoff. means when we Login after few seconds connection goes to Logoff automatically. Here i am unable to establish a proper session.
Can anyone please help me how to maintain session in this case??