-
Notifications
You must be signed in to change notification settings - Fork 0
Context
Jiowcl edited this page May 20, 2021
·
7 revisions
EnableExplicit
IncludeFile "../Core/ZeroMQ.pbi"
Global lpszLibZmqDll.s = "libzmq.dll"
Global hLibrary.i = ZmqDllOpen(lpszLibZmqDll)
If hLibrary
Define Context.i = ZmqCtxNew(hLibrary)
ZmqCtxSet(hLibrary, Context, #ZMQ_MAX_SOCKETS, 16)
Debug ZmqCtxGet(hLibrary, Context, #ZMQ_MAX_SOCKETS)
ZmqCtxShutdown(hLibrary, Context)
ZmqDllClose(hLibrary)
EndIf
EnableExplicit
IncludeFile "../Core/Enums.pbi"
IncludeFile "../Core/ZeroMQWrapper.pbi"
UseModule ZeroMQWrapper
Global lpszLibZmqDll.s = "libzmq.dll"
If DllOpen(lpszLibZmqDll)
Define Context.i = ZmqContext::New()
ZmqContext::Set(Context, #ZMQ_MAX_SOCKETS, 16)
Debug ZmqContext::Get(Context, #ZMQ_MAX_SOCKETS)
ZmqContext::Shutdown(Context)
DllClose()
EndIf