My Project
Loading...
Searching...
No Matches
wolfExamples.h
1#ifndef _WOLFEXAMPLES_H_
2#define _WOLFEXAMPLES_H_
3
4#include <rt.h>
5
6#ifdef __cplusplus
7 extern "C" {
8#endif
9
10// support functions for all threads
11BOOLEAN Catalog(RTHANDLE hProcess, RTHANDLE hObject, LPSTR lpszName);
12void Cleanup(void);
13void Fail(LPSTR lpszMessage, ...);
14DWORD UsecsToKticks(DWORD dwUsecs);
15
16
17/* Example API's */
18int wolfExample_TLSServer(int port);
19int wolfExample_TLSClient(const char* ip, int port);
20int wolfExample_TLSLocal(int port);
21
22
23// global type definitions
24typedef enum {
25 BEFORE_INIT,
26 INIT_BUSY,
27 INIT_DONE,
28 CLEANUP_BUSY
29} INIT_STATE;
30
31typedef struct {
32 RTHANDLE hMain; // RTHANDLE of main thread
33 INIT_STATE state; // main thread state
34 BOOLEAN bCataloged; // TRUE if we cataloged process name in root
35 BOOLEAN bShutdown; // TRUE if all threads have to terminate
37
38// global variables
39extern RTHANDLE hRootProcess; // RTHANDLE of root process
40extern DWORD dwKtickInUsecs; // length of one low level tick in usecs
41extern INIT_STRUCT gInit; // structure describing all global objects
42
43#ifdef __cplusplus
44 } /* extern "C" */
45#endif
46
47#endif /* _WOLFEXAMPLES_H_ */
Definition wolfExamples.h:31