|
-
April 5th, 2006, 06:57 AM
#1
Session TPC/IP connection
Hi everybody,
I am making a web-based MSN messenger. Here is the program architecture
(Web Client) <====> (Web Server) <====> (MSN Servers)
Web Client: I use AJAX to communicate Web Server
Web Server: Windows 2K, apache server, PHP.
Web Server connects to MSN Server(s) through TCP/IP sockets
I have faced one problem for a week. Currently, I could not find out the solution. To LogIn to MSN Server:
1. Web Client requests login.php page from Web Server
2. Web Server connects to MSN Server, and Web Server has to keep connection alive with MSN Server until Web Client logs out.
3. If LogIn is successful, Web Server returns a message to notify that It is successful. Whenever the execution of login.php finishes, the connection with MSN Server is closed immediately by Web Server. I want to keeps that connection alive.
In Login.php, I create new class, this class establishes conection with MSN Server. And this class is saved in $_SESSION array. This class will be used in subsequent page requests, and connection will be available for subsequent page requests. But In fact, the connection is closed immediately whenever Login.php is returned to client. The class is not used in subsequent pages also. So can you help me to explain me that the problem is, and how to solve it.
Thank you very much.
Quang
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|