Datasheet

API Delphi
250
function send_command(cmd_arr: array of string): integer;
Send the strings contained in the array, then send a #0 (example:
res:=send_command(['/ppp/active/print','=stats=','=without-paging=']); ). Each send_command increase the
command counter of the object. Each !done decrease this counter. You can test if there are pending commands
calling the following method: function tr_mkrouter.command_pending: boolean;
function mrecv_sentence(var vs: string): integer;
Wait for output from router, in the vs string return the text until #0 is received. It receive an api sentence.
function mrecv_done(var vs: string): integer;
Wait for output from router, in the vs string return the text until !done is received. It receive the full response of a
command.
function query_router(cmd_arr: array of string; var res: string): integer;
Is the union of a send_command and a mrecv_done.
Build the project: the libraries used
The download, contains this libraries:
- MD5.pas class (form Francois Piette), used in login handshake, at MD5.PAS
[1]
- Synapse library to work with sockets at Synapse
[2]
- Logger library: class used to log in a memo and/or in a file the application activity
- Utils library: contain some useful procedures to work with IP and strings
- Synapse library to work with sockets at Synapse
[2]
To build the sample application, add the word "synapse" to the Project>Options>Directory Conditionals>Search
path.
In different versions of delphi, could be necessary to modify some links to used units (ex. is you use Delphi 5, you
must provide StrUtil.pas (thanks to pedja) at strutil.pas
[3]
)