Documentation.

Server Libraries Node.js

Sections

Basics

  1. Quick Start Guide
  2. Quick Start with Node.js
  3. Theming

Development

  1. Server Libraries
  2. Database Backends

Code API

  1. Server-side PHP
  2. Node.js Server
  3. Client-Side Scripts
 

Overview

The Node.js library allows you to run Ajax IM using the included stand­alone mes­sage server. This allows you to sup­port a sig­nif­i­cantly larger num­ber of users simul­ta­ne­ously with­out as sig­nif­i­cant of a server strain. The script requires that a data­base library (such as the included MySQL library) be in use in order to han­dle authen­ti­ca­tion; all mes­sages are sent and received through the Node.js server.

This library makes use of the Mem­cache PHP exten­sion, as the Node.js server uses the Mem­cache API to com­mu­ni­cate with exter­nal scripts and appli­ca­tions. If you do not have the Mem­cache library installed in your PHP instal­la­tion, you will need install it before using this library.

This library is database-agnostic, mean­ing that it should work with any properly-constructed data­base library.

add_friend($friend, $group) Function

The add_friend($friend, $group) allows an authen­ti­cated user to add a new friend to their bud­dylist. It is a good exam­ple of how to use a data­base library and com­mu­ni­cate with the Node.js server. If you do not need this func­tion, it is safe to sim­ply delete it.

No Comments Yet

You can be the first to comment!

Leave a comment