-
Scaner's scripts data sending and receiving function can be found here. Scaner
uses blocking sockets, so every data transmitting operation suspends script's
execution. For UDP sockets it is possible to set timeout for receive operations.
By default timeout is 8 seconds but you can change it by editing file
Scripts\Scaner\nvscripts.ini
|
|
|
Disconnects connections without terminationg script's executions. Script
execution terminates on any other data transfer function error.
function Recvch: string;
Receives or gets from buffer and returns 1 character. Terminates script if
connection is broken.
function Recv: String;
Receives or gets from buffer all accessible data. Terminates script if
connection is broken.
function Recvln: String;
Receives or gets from buffer string ending by chr(13)+chr(10).
Terminates script if connection is broken.
procedure Send(s: string);
Sends string s to remote side. Terminates script if connection is broken.
procedure SetEcho(EchoOn:integer);
Enable data echo - every received from remote charachter will be immediately
echoed to remote side.
function Readln(question: string): string;
Shows dialogue window with text question and text input field. Returns entered
by user text.
procedure Writeln(s: string);
Sets information that will be shown in Responce column.
Returns 1 for Scaner scripts.
procedure SyncScript(I: Longint);
If I=1 then scripts enters critical section, if I=0 - leaves it. Only one script
can own scritical section.
function NV_CNAME: string;
Returns local host name.
Returns remote IP.
function NV_PORT: integer;
Returns socket port number.
Return remote IP address in network byte order.
|