M8. 接続

ライセンス上限到達(接続拒否)

ライセンス制限によって接続が拒否された場合に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - 端末ID

address - 端末ネットワークアドレス

station - 端末のNetBIOS名(DNS名での置き換えなし)

type - タイプは station

ignored

プロシージャテキスト

--[[

Called:

 when connection denied according license limitation

 

Database:

 available

 

Parameters:

 id             station ID

 address        station network address

 station        station name

                this is NetBIOS station name (not replaced by DNS one)

 type           one of 'station'

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.id, args.address, args.station, args.type

 

-- no return => `nil' value

接続エラー

新規クライアントの接続を確立できない場合に呼び出されます。可能性のある原因:ライセンスの空きがない(この場合、license_error.ds が最初に呼び出されます)、データベースへの接続がない、データベースエラー、承認待ちの端末数が多すぎる、Dr.Web ServerまたはDBがオーバーロードしている

データベース

パラメータ

戻り値

原因が no license の場合は使用可能、overload の場合は使用可能である可能性あり(この場合のDBの使用は非推奨)

address - クライアントアドレス

reason - 接続エラーの原因:

no database - データベース接続の確立なし

overload - データベースのオーバーロード

no license - 接続を受け入れるための空きライセンスなし

ignored

プロシージャテキスト

--[[

Called:

 when new client connection cannot be established

 

Database:

 available if reason is "no license" and potentialy available if

 reason is "overload" (but it is not recommended to use DB that time)

 

Parameters:

 address                   client address

 reason   "no database"    no established database connection

          "overload"       database is overloaded

          "no license"     no available license to accept connection

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.address, args.reason

クライアントからPONG受信

クライアントからPONGを受信した場合に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - クライアント ID

address - クライアントネットワークアドレス

station - クライアント名(Agent、Server、インストーラ)

time - パケットラウンドトリップタイム

ignored

プロシージャテキスト

--[[

Called:

 when 'PONG' received from client

 

Database:

 available

 

Parameters:

 id         client ID

 address    network address

 station    station name (for Agent, Server, Installer)

 time       packet round-trip time in milliseconds

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.id, args.address, args.station,

                -- args.time

クライアント切断

クライアントが切断した場合に呼び出されます。

データベース

パラメータ

戻り値

使用可能

id - クライアント ID

address - クライアントネットワークアドレス

type - クライアントタイプ:unknownstationconsoleserverinstallernewbie

station - 端末名(Agentのみ)

bytesin - 受信したバイト

bytesout - 送信したバイト

totalbytesin - 受信したバイト(圧縮)

totalbytesout - 送信したバイト(圧縮)

reason - 切断理由

ignored

プロシージャテキスト

--[[

Called:

 when client disconnected

 

Database:

 available

 

Parameters:

 id              client ID

 address         network address

 type            client type: "unknown", "station", "proxy",

                               "server", "installer", "newbie"

 station         station name (only for Agent)

 bytesin         bytes received

 bytesout        bytes sent

 totalbytesin    compressed bytes received

 totalbytesout   compressed bytes sent

 reason          disconnect reason

 

Returned value:

 ignored

 

]]

 

local args = ... -- args.id, args.address, args.type, args.station

                -- args.bytesin, args.bytesout

                -- args.totalbytesin, args.totalbytesout

                -- args.reason