User`s guide
KwikNet Low Level Services
K
A
DAK
151
kn_enter kn_enter
kn_exit kn_exit
Purpose Launch or Terminate the KwikNet TCP/IP Stack
Used by n Task o ISP o Timer Procedure n Restart Procedure n Exit Procedure
Setup Prototype is in file KN_API.H.
#include "KN_LIB.H"
void kn_enter(void);
void kn_exit(void);
Description Procedure kn_enter() must be called to launch (start) the KwikNet TCP/IP
Stack.
Procedure
kn_exit() must be called to terminate (stop) the KwikNet
TCP/IP Stack.
In a multitasking system, procedure kn_enter() must be called before
any task can use KwikNet services. Procedure kn_exit() 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_enter() must be called by the
App-Task. Procedure kn_exit() 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 Nothing
Restriction A fatal KwikNet error will occur if you call procedure kn_exit() 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.
Restriction You must not shut down
KwikNet unless KwikNet's memory is allocated
from a static array or from a fixed region of memory acquired when
KwikNet is started and released when KwikNet is stopped. If you do so and
then try to restart KwikNet by calling kn_enter(), KwikNet will initiate a
fatal exit.
AMX Note Procedure
kn_enter() can be treated as if it is an AMX Restart
Procedure. Alternatively, it can be called from a Restart Procedure or
from an application task.
Procedure kn_exit() can be treated as if it is an AMX Exit Procedure.
Alternatively, it 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_godown(), kn_panic()