Step-by-step Usage Instructions
|Top Previous Next|
1. Add sock.tbs and sock.tbh files to your project (they are in current_library_set\sock\trunk).
2. Add include "sock\trunk\sock.tbh" to the includes section of the global.tbh file.
3. Call sock_get() whenever you need a free socket. Observe the result — if it is 255 then there are no free sockets available!
4. Call sock_release() when you no longer need a particular socket. This way, the socket can be reused by something else in your code.
Additional recommended steps
We have provided a code snippet illustrating the use of the SOCK library.