diff --git a/.gitignore b/.gitignore index e825fee..d26fc9a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ __history fastmm4 dunit -bin\*.dll \ No newline at end of file +bin\*.dll +bin\dunit.ini \ No newline at end of file diff --git a/README.md b/README.md index 9dbdd77..33dc9d0 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ 0MQ Binding for Delphi ====================== -This is a binding for [ZMQ](http://www.zeromq.org). Should work with all Delphi versions and with FPC 2.6.0. +This is a binding for [ZMQ](http://www.zeromq.org). Should work with Delphi7+ versions and with FPC 2.6.0. General ======= @@ -9,7 +9,8 @@ General The package contains a wrapper (zmq.pas), and a higher level api (zmqapi.pas). It should work with ZMQ 2.2.x, and with 3.2.x. For version 2.2.x undefine zmq3, in zmq.inc. The dll's are not part of this repo, you can download the appropriate from -[the official distro](http://www.zeromq.org/intro:get-the-software) +[the official distro](http://www.zeromq.org/intro:get-the-software), and rename it +to `libzmq.dll`. This is a work in progress, please open an issue if you find bugs, or have question, or proposal. diff --git a/bin/dunit.ini b/bin/dunit.ini deleted file mode 100644 index c6500e3..0000000 --- a/bin/dunit.ini +++ /dev/null @@ -1,100 +0,0 @@ -[GUITestRunner Config] -AutoSave=1 -Left=110 -Top=30 -Width=446 -Height=550 -Maximized=1 -UseRegistry=0 -ResultsPanel.Height=193 -ErrorMessage.Height=43 -ErrorMessage.Visible=1 -FailureList.ColumnWidth[0]=188 -FailureList.ColumnWidth[1]=100 -FailureList.ColumnWidth[2]=393 -FailureList.ColumnWidth[3]=331 -HideTestNodesOnOpen=0 -BreakOnFailures=0 -SelectTestedNode=1 -FailOnNoChecksExecuted=0 -FailOnMemoryLeaked=1 -IgnoreSetUpTearDownLeaks=0 -ReportMemoryLeakTypes=1 -WarnOnFailTestOverride=0 -PopupX=350 -PopupY=30 - -[Tests.test.exe.TestTZMQSocket] -Testsend=0 -Testsend1=0 -Testsend2=0 -Testsend3=0 -Testrecv=0 -Testrecv1=0 -Testrecv2=0 -Testrecv3=0 -TestgetSocketType=0 -TestgetrcvMore=0 -TestgetHWM=0 -TestgetRcvTimeout=0 -TestgetSndTimeout=0 -TestgetSwap=0 -TestgetAffinity=0 -TestgetIdentity=0 -TestgetRate=0 -TestgetRecoveryIvl=0 -TestgetRecoveryIvlMSec=0 -TestgetMCastLoop=0 -TestgetSndBuf=0 -TestgetRcvBuf=0 -TestgetLinger=0 -TestgetReconnectIvl=0 -TestgetReconnectIvlMax=0 -TestgetBacklog=0 -TestgetFD=0 -TestgetEvents=0 - -[Tests.tests.exe.TSocketTestCase] -TestSocketType=0 -TestrcvMore=0 -TestHWM=0 -TestSndHWM=0 -TestRcvHWM=0 -TestLastEndpoint=0 -TestAcceptFilter=0 -TestMonitor=0 -TestRcvTimeout=0 -TestSndTimeout=0 -TestAffinity=0 -TestIdentity=0 -TestRate=0 -TestRecoveryIvl=0 -TestSndBuf=0 -TestRcvBuf=0 -TestLinger=0 -TestReconnectIvl=0 -TestReconnectIvlMax=0 -TestBacklog=0 -TestFD=0 -TestEvents=0 -TestSubscribe=0 -TestunSubscribe=0 -SocketPair=0 -TestMonitorConnectDisconnect=0 - -[Tests.tests.exe] -TPushPullTestCase=0 -TSocketTestCase=0 -TPollTestCase=0 -TContextTestCase=0 - -[Tests.tests.exe.TContextTestCase] -ContextTerminate=0 -ContextDefaults=0 -SetIOThreads=0 -SetMaxSockets=0 -lazyPirateBugTest=0 - -[Tests.tests.exe.TPollTestCase] -PollRegister=0 - diff --git a/tests/ContextTestCase.pas b/tests/ContextTestCase.pas index 9115fc0..8f4aa05 100644 --- a/tests/ContextTestCase.pas +++ b/tests/ContextTestCase.pas @@ -54,6 +54,8 @@ procedure TContextTestCase.ContextTerminate; begin for st := Low( TZMQSocketType ) to High( TZMQSocketType ) do begin + if context = nil then + context := TZMQContext.Create; FZMQSocket := context.Socket( st ); try FZMQSocket.bind('tcp://127.0.0.1:5555'); diff --git a/zmq.pas b/zmq.pas index e9ed1a7..4522226 100644 --- a/zmq.pas +++ b/zmq.pas @@ -387,12 +387,13 @@ function zmq_poll( var items: pollitem_t; nitems: Integer; timeout: Longint ): I function zmq_proxy( frontend, backend, capture: Pointer ): Integer; cdecl; external libzmq; {$endif} - +{* Deprecated aliases *} const ZMQ_STREAMER = 1; ZMQ_FORWARDER = 2; ZMQ_QUEUE = 3; - + +{* Deprecated method *} function zmq_device(device: Integer; insocket,outsocket: Pointer): Integer; cdecl; external libzmq; {* Helper functions are used by perf tests so that they don't have to care *}