T
TomB
Guest
I'm using plain old OpenEdge AppServer (not PAS) 11.7 using a generated proxy dll (Proxy Generator for Open Clients) for C#.
This works quite good apart from setting a timeout for connections. If I call a function using that proxy I want to set a timeout so that the call fails (e.g. by throwing an exception)
I've tried following Progress.Open4GL.RunTimeProperties
RunTimeProperties.ConnectionTimeout
Undocumented. Does not do what the name suggests
RunTimeProperties.SocketTimeout = 8000;
Not documented. Default is 0. Value mostlikely to be milliseconds
Getting closer with this setting. If the execution time of the called function exceeeds this value an Progress.Open4GL.Exceptions.Open4GLException is thrown
BUT: It only throws when the calling function returns thus it is quite useless. Easy to test by adding a "PAUSE 100" to the function to be called. After 100 seconds the exception gets thrown (and not after 8 seconds)
How to implement a timeout for a function call?
Continue reading...
This works quite good apart from setting a timeout for connections. If I call a function using that proxy I want to set a timeout so that the call fails (e.g. by throwing an exception)
I've tried following Progress.Open4GL.RunTimeProperties
RunTimeProperties.ConnectionTimeout
Undocumented. Does not do what the name suggests
RunTimeProperties.SocketTimeout = 8000;
Not documented. Default is 0. Value mostlikely to be milliseconds
Getting closer with this setting. If the execution time of the called function exceeeds this value an Progress.Open4GL.Exceptions.Open4GLException is thrown
BUT: It only throws when the calling function returns thus it is quite useless. Easy to test by adding a "PAUSE 100" to the function to be called. After 100 seconds the exception gets thrown (and not after 8 seconds)
How to implement a timeout for a function call?
Continue reading...