Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
service:index [2010/03/07 21:52] – digitalman | service:index [2010/03/15 14:53] – digitalman |
---|
- Dynamic Native | - Dynamic Native |
- Static Native | - Static Native |
| |
| ===== JavaScript Services ===== |
| Additional methods and properties available to Synchronet Services written in JavaScript: |
| |
| ==== Properties ==== |
| |
| ^Property ^Type ^Description^ |
| |''logged_in'' |boolean|Indication if user has successfully authenticated or not| |
| |''datagram'' |string |Contents of received UDP datagram (when applicable)| |
| |
| ==== Methods ==== |
| |
| Along with the [[http://synchro.net/docs/jsobjs.html#global_methods|common global methods]], JavaScript services include support for the following methods: |
| |
| ^Method ^Returns ^Usage ^Description^ |
| |''login''|boolean|''login(user, password [,increment_logins=//false//])''|Attempt to authenticate as specified user (name or number)| |
| |''logout''|boolean|''logout()'' |Logout currently authenticated user| |
| |''server.client_add''|void|''server.client_add(//Socket//, [user], [host])'' |Register client based on specified socket connection, with optional username and hostname| |
| |''server.client_update''|void|''server.client_update(//Socket//, [user], [host])''|Update client based on specified socket connection, with optional username and hostname| |
| |''server.client_remove''|void|''server.client_remove(//Socket//)'' |Unregister client based on specified socket connection| |
| |
===== Configuration ===== | ===== Configuration ===== |
* [[:config:services.ini]] | * [[:config:services.ini]] |
* [[:server:|Servers]] | * [[:server:|Servers]] |
| |
| {{tag>tcpip servers services javascript}} |
| |