• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

How does PFC check client connections/disconnections?

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
19 posts • Page 1 of 2 • 1, 2

Postby Baez » Thu Apr 29, 2010 7:11 am

As the title says, how does PFC check for a client connection. Or more importantly how does it consistently check for users disconnecting or timing out?

Can someone point me to functions that handle this?

Thanks :)
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby Baez » Thu May 06, 2010 1:25 am

Anyone have any insight into this? I see the developers have logged in since I've posted this as well.
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby phpfreechat » Fri May 07, 2010 9:39 am

It just uses a inactivity timeout.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby Baez » Sat May 08, 2010 7:08 am

Well it keeps users online until they close the chat window. So how does PFC check for that inactivity or closed window? I'm trying to find it to understand exactly how PFC's inner workings function :)
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby OldWolf » Sat May 08, 2010 8:14 pm

When the user has the window open, the page is constantly poling the server for new messages. When the user closes the window, this poling stops. After a given amount of time with no activity, the server considers that user to have closed the window and drops them off the list.
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Baez » Sun May 09, 2010 7:17 am

Thanks Wolf but that's exactly my question. How does it perform that constant polling and checking? I'm looking for an answer in programming terms. Like the specific classes and/or functions that perform this. It works very consistently and dependably compared to other chat programs that are constantly dropping users and connections.
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby Baez » Thu May 13, 2010 4:59 pm

Still looking if you can provide an answer :)
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby OldWolf » Fri May 14, 2010 1:17 am

Never looked, it would take me as long for me to find it as you, sorry!
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Baez » Fri May 14, 2010 2:02 am

No problem thanks Wolf. I'll wait for kerphi to shed some light.
Baez
New member
 
Posts: 8
Joined: Thu Apr 29, 2010 7:03 am
Top

Postby Jaybird » Sun Aug 08, 2010 9:44 pm

Baez wrote:No problem thanks Wolf. I'll wait for kerphi to shed some light.

yeah.. me too..
Jaybird
Member
 
Posts: 65
Joined: Mon Jun 28, 2010 7:59 am
Top

Postby phpfreechat » Mon Aug 09, 2010 8:42 am

Technically, it just uses AJAX to check that user is online.
phpfreechat
Site Admin
 
Posts: 2657
Joined: Tue Feb 07, 2006 3:35 pm
Location: France
Top

Postby radionow » Mon Aug 09, 2010 1:43 pm

oh Kerphi, i sent ya an email, did ya get it?
My Site: http://chickentalk.org/
radionow
Member
 
Posts: 57
Joined: Sun Jan 10, 2010 6:26 pm
Top

Postby Jaybird » Wed Aug 11, 2010 10:51 pm

Kerphi,

I wanted to know where the routine is located, because I want to add a function to clear session data, and refresh to the main page when the script detects a connection drop.
Jaybird
Member
 
Posts: 65
Joined: Mon Jun 28, 2010 7:59 am
Top

Postby Jaybird » Thu Aug 12, 2010 2:49 am

Kerphi,

I looked in main.php of en_US from i18n, and I found this:

Code: Select all
// line 25 in send.class.php
$GLOBALS["i18n"]["Your must be connected to send a message"] = "You must be connected to send a message";

I want to find that exact routine, but I went to line 25 of send.class.php and its not there, actually it's not in the code at all, and must have been moved.. any ideas?
Jaybird
Member
 
Posts: 65
Joined: Mon Jun 28, 2010 7:59 am
Top

Postby pastorbones » Thu Aug 26, 2010 11:12 pm

I'm having the same error message whenever trying to send a message.

The line that sends the error message is actually in the proxy auth.class.php on line 52.

$cmd->run($xml_reponse, $cmdp); on line 74 of send.class.php triggers the auth (user online) check, which fails for some reason or the other...I'll have to do WAY more digging to find out why, but maybe this info helps someone else figure this bug out, since the developer seems to be unavailable.
pastorbones
New member
 
Posts: 4
Joined: Thu Aug 26, 2010 10:58 pm
Top

Next

Post a reply
19 posts • Page 1 of 2 • 1, 2

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 7 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub