Hi all, I've just started learning server and client communication using socket.
What I'm doing here is like a Search Engine.
Server stores data (from a textfile) , then client search and check it exists or not.
Everything works fine, but I can't seem to loop for multiple search. (Meaning after client search and get results, it will continue prompting user to search for something else, until user ends the program by entering 'end')
My application ends after I finished searching once.
Is there a solution to this?

Thanks in advance.

>>Is there a solution to this?

Yes, use a loop. Your question is too vague to be of much more help.

This is how I it to work:

Search for: abc
Found: abc

Search for: 123
Can't find 123

Search for: end
Good Bye!

I tried using a loop, but it just doesnt prompt me to search again, the client program just ended. Seems like my connection with the server/socket was closed. Is there a way to reopen connection/socket?

Please post the problem area of your code for further help.