zaifapi class : TimeOut(int) setter

Description

Sets a timeout span.

Syntax

zaifapiInstance.TimeOut = value

Assigned value

ClassDescription
intTimeout span. The unit is milliseconds.

Return value

None

Sample code

1:

zaifapi zaifapiIns = new zaifapi();

2:

zaifapiIns.TimeOut = 1000; // 1000 millisecond

Notes

The timeout span should be specified in milliseconds.

The default for the timeout span is 100000 milliseconds.

You can set the timeout span only before the first request. If you try to set it after some request, an exception occurs.

Note : no exception occurs when a timeout occurs.

If the result of the request does not return within the set value, a timeout occurs and the following JSON-text is returned.

{"success": -1001,"error": { "typename" : "TaskCanceledException", "message": "A task was canceled."}}

Links for reference

Copyright © Cooker All rights reserved.