xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

NetFunc()

Evaluates a code block until a timeout period expires.

Syntax

Netfunc( <bCodeblock> [, <nSeconds>] ) --> lSuccess

Arguments

<bCodeblock>
This is a code block which must return a logical value. The function returns when the code block yields .T. (true), and evaluates the code block again when it returns .F. (false)
<nSeconds>
Optionally, a numeric value can be passed specifying the amount of seconds to retry the operation before the function returns without success. It defaults to the return value of SetNetDelay().

Note:  specifying zero for <nSeconds> means "forever", i.e. there is no timeout period and the code block must yield .T. (true) for the function to return.

Return

The return value is .T. (true) when the code block is successfully evaluated, otherwise .F. (false) is returnd.

Description

NetFunc() is a generic network function which evaluates a code block and monitors a timeout period if the code block evaluates to .F. (false). The code block is repeatedly evaluated until either the timeout period expires or the code block returns .T. (true).

Info

See also:NetAppend(), NetFileLock(), NetRecLock()
Category: Database functions , Network functions , xHarbour extensions
Source:rtl\ttable.prg
LIB:xhb.lib
DLL:xhbdll.dll


Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe