Functions | |
void | display_page (void) |
display the form for paging (x-messaging) another user | |
void | page_user (void) |
page another user | |
void | do_chat (void) |
multiuser chat | |
void | page_popup (void) |
display page popup If there are instant messages waiting, and we notice that we haven't checked them in a while, it probably means that we need to open the instant messenger window. | |
int | setup_chat_socket (void) |
Support function for chat make sure the chat socket is connected and in chat mode. | |
void | chat_recv (void) |
Receiving side of the chat window. This is implemented in a tiny hidden IFRAME that just does JavaScript writes to other frames whenever it refreshes and finds new data. | |
void | chat_send (void) |
sending side of the chat window |
void do_chat | ( | void | ) |
multiuser chat
First, check to make sure we're still allowed in this room.
If the chat socket is still open from a previous chat, close it -- because it might be stale or in the wrong room.
WebCit Chat works by having transmit, receive, and refresh frames. Load the frameset. (This isn't AJAX but the headers output by begin_ajax_response() happen to be the ones we need.)
Definition at line 104 of file paging.c.
References begin_ajax_response(), do_template(), end_ajax_response(), serv_getln(), serv_printf(), and smart_goto().
Referenced by session_loop().
void page_popup | ( | void | ) |
display page popup If there are instant messages waiting, and we notice that we haven't checked them in a while, it probably means that we need to open the instant messenger window.
JavaScript function to alert the user that popups are probably blocked
First, do the check as part of our page load.
Then schedule it to happen again a minute from now if the user is idle.
Definition at line 142 of file paging.c.
References serv_getln(), serv_puts(), and wprintf().
Referenced by output_headers().
int setup_chat_socket | ( | void | ) |
Support function for chat make sure the chat socket is connected and in chat mode.
unix domain socket
tcp socket
Temporarily swap the serv and chat sockets during chat talk
Unswap the sockets.
Definition at line 202 of file paging.c.
References ctdlhost, ctdlport, serv_getln(), serv_printf(), serv_puts(), tcp_connectsock(), and uds_connectsock().
Referenced by chat_recv(), and chat_send().
void chat_recv | ( | void | ) |
Receiving side of the chat window. This is implemented in a tiny hidden IFRAME that just does JavaScript writes to other frames whenever it refreshes and finds new data.
See if there is any chat data waiting.
Temporarily swap the serv and chat sockets during chat talk
Unswap the sockets.
Append our output data
Output our fun to the other frame.
Definition at line 268 of file paging.c.
References extract_token(), jsescputs(), num_tokens(), output_headers(), serv_getln(), setup_chat_socket(), wDumpContent(), and wprintf().
Referenced by session_loop().
void chat_send | ( | void | ) |
sending side of the chat window
Temporarily swap the serv and chat sockets during chat talk
Unswap the sockets.
Definition at line 421 of file paging.c.
References bstr(), output_headers(), serv_puts(), setup_chat_socket(), wDumpContent(), and wprintf().
Referenced by session_loop().