User`s guide

154
K
A
DAK
KwikNet Low Level Services
kn_godown kn_godown
Purpose Initiate a Shutdown of the KwikNet TCP/IP Stack
Used by
n Task o ISP o Timer Procedure o Restart Procedure n Exit Procedure
Setup Prototype is in file KN_API.H.
#include "KN_LIB.H"
int kn_godown(int timeout);
Description Timeout is the maximum interval, measured in seconds, which the caller
is willing to wait for the KwikNet shutdown to complete. If timeout is
0, the caller will wait forever or until an error condition is detected.
In a multitasking system, procedure kn_godown() must not be called until
all tasks, including KwikNet client and server tasks, have stopped using
KwikNet services.
In a single threaded system, procedure kn_godown() must be called by the
App-Task. Procedure kn_godown() must not be called until the App-Task
and all active clients and servers, including KwikNet clients and servers,
have stopped using KwikNet services.
Returns If successful, a value of 0 is returned.
On failure, the error status 1 is returned.
If a shutdown has already been initiated, a value of -1 is returned.
Restriction Procedure kn_godown() must be called to shut down the KwikNet TCP/IP
Stack prior to calling kn_exit() to terminate operation of the stack. If
this restriction is not met, KwikNet will automatically call this function with
a 2 minute (120 second) timeout interval when kn_exit() is called.
Restriction This procedure name will be unresolved if you reference this procedure
and your KwikNet Library does not have KwikNet shut down enabled. Edit
your
KwikNet Network Parameter File and check the option box labeled
"
KwikNet can be shut down" on the General property page. Then rebuild
your
KwikNet Library.
AMX Note Procedure kn_godown() can be called from an Exit Procedure or from an
application task which is executing on behalf of an AMX Exit Procedure.
See Also
kn_enter(), kn_exit(), kn_panic()