QM Client API

From ScarletDME
Revision as of 12:40, 5 December 2008 by Diccon (talk | contribs) (Entered qm Server setup section)
Jump to navigation Jump to search


QM provides a remote API access to any client system that can get to the server via socket 4243, and obeys the protocol.

Server Setup

QM is technically able to handle API connections about of the box. However your server will need some configuring. (RPM will do this for you in near future).


First we need to register port 4243 in /etc/services to let the system recognize it.

Personally I just manually edited /etc/services, found the apropriate place (ie entry's in port order) to put it in and popped in the following:

 qmclient        4243/tcp                        # Open QM API

Save and exit.


Firstly you will need xinetd installed, if you are running on telnet it's already there.

Second you will need an entry in xinit for qmclient. So put the following in /etc/xinit.d/qmclient

# default: on
# description: OpenqQMs API port, unencrypted binary protocol.
service qmclient
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = root
        server          = /usr/qmsys/bin/qm
        server_args     = -n -q
        log_on_failure  += USERID
        disable         = no
        port            = 4243

Now restart xinetd (/etc/init.d/xinetd restart)


If you need to. Telnet localhost 4243 can check if your changes have worked. Telnet will connect but leave you clung on, but it will not refuse your connection. Ctr-] will allow you to quit. You can test WAN port availability, firewalls, etc, using this test.


The following is a guide to the protocol that the server responds to.

Currently a working document, far from perfect, but you get the idea:


API library's

  • C - native - Released
  • Visual Basic - native - released
  • Java API - native - Alpha stage
  • Delphi - Wrapper - (native expected Q1 2009)
  • PHP - wrapper - Beta - native proposed