Jump to content

Persistent sockets


groomi

Recommended Posts

Hello, I am trying to make a simple MSN client in PHP to use in places when I don't have access to MSN it's self.

 

My initial thought was to use socks to connect and then send/retreive commands over the socket to communicate with the MSN server..

 

The problem arises when the page is refreshed or a link is pressed as the socket is destroyed.  I have tried many different things to retreive a socket and continue using it after the page is reloaded.

 

My question is: Is there a way that I can use the same socket after a page has been refreshed.  I first thought of using pfsockopen() and assigning the socket to a session variable but this failed.

 

Any help would be much appreciated

 

Thanks

 

Link to comment
Share on other sites

pfsockopen() does not operate with sessions.  Resources cannot be place in sessions in any case.

 

It's not clear from the manual what the correct usage is, but from the comments it appears to be that you make the same call that you made the first time, and you will receive the persistent socket.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.