A) If I have a java application which starts up and waits for socket connections on a specified port. Is there a way i could maintain a session connection in php after a user validates, i.e a persistent connection?
B) I mean, I'm trying to understand how its done with mysql and php. How does mysql or php know what the last opened connection was so you don't have to do mysql_connect after ?
C) Is there any benefit to opening and closing a connection on each page load or is it better to maintain a persistent connection?
D) If the latter is true in C, can you describe or give an example of how it would be achieved in a php --> Java connection