Richard Newton
d4d23caf32
Add new socket monitor event for when socket monitoring is stopped.
2013-07-01 11:00:46 +01:00
Martin Hurton
aef2171e83
Make last_endpoint attribute of socket object
2013-06-29 17:26:13 +02:00
Pieter Hintjens
ad77937956
Added ZMQ_STREAM socket type
...
- designed for TCP clients and servers
- added HTTP client / server example in tests/test_stream.cpp
- same as ZMQ_ROUTER + ZMQ_ROUTER_RAW + ZMQ_ROUTER_MANDATORY
- includes b893ce set ZMQ_IDENTITY on outgoing connect
- deprecates ZMQ_ROUTER_RAW
2013-06-27 20:53:15 +02:00
Martin Hurton
c3e40736de
Rename terminated->pipe_terminated
2013-06-06 13:28:21 +02:00
Pieter Hintjens
8358d4e832
Renamed ZMQ_DELAY_ATTACH_ON_CONNECT_COULD_THIS_BE_ANY_LONGER to ZMQ_IMMEDIATE
2013-03-12 16:11:19 +01:00
Pieter Hintjens
f0f16505e5
Removed corporate advertisements from source file headers
...
Copyrights had become ads for Sustrik's corporate sponsors, going against the original
agreement to share copyrights with the community (that agreement was: one line stating
iMatix copyright + one reference to AUTHORS file). The proliferation of corporate ads
is also unfair to the many individual authors. I've removed ALL corporate title from
the source files so the copyright statements can now be centralized in AUTHORS and
source files can be properly updated on an annual basis.
2013-03-12 13:24:57 +01:00
Guido Goldstein
b0b8ab27c5
Changed message structure for event notifications.
2013-03-08 13:48:18 +01:00
Guido Goldstein
21eeb03b6c
Simplified the zmq_event_t structure for easier access and better usability towards language bindings.
2013-03-08 10:34:25 +01:00
Sébastien Rombauts
41d79bc19e
Windows CE support : using standard _WIN32_WCE flag instead of WINCE
...
- when compiling for Windows CE, a C++ project must define the preprocessor definitions: UNDER_CE=$(CEVersion),_WIN32_WCE=$(CEVersion)
- choosing the "_WIN32_CE" form for uniformization with "_WIN32" and "_WIN32_WINNT" already used in libzmq (boost is using both forms)
- see http://msdn.microsoft.com/en-us/library/ee479161(v=winembedded.60).aspx
2013-02-19 16:49:23 +01:00
Sébastien Rombauts
927000fe2f
Fixed 7 MSVC2008 Compiler Warning (level 3) C4800: 'const int' : forcing value to bool 'true' or 'false' (performance warning)
...
- added explicit test "(xxx != 0)" to get a "bool" value out of the "int" expression
- see the MSDN recommandation http://msdn.microsoft.com/en-us/library/b6801kcy(v=vs.90).aspx
2013-02-19 14:27:14 +01:00
Pieter Hintjens
8ab3c4a1bf
Fixed issue #500
2013-01-31 21:52:30 +01:00
Pieter Hintjens
309740e197
Fixed issue #499
2013-01-31 20:47:45 +01:00
Matt Arsenault
6ce464414b
Fix typos
2013-01-02 03:24:11 -05:00
Matt Arsenault
1ffc5d11dc
Fix some of the -Wshadows
2013-01-02 03:24:11 -05:00
Stefan Radomski
21345ffa50
Break early when pipe to be removed was found
2012-12-04 17:40:43 +01:00
Stefan Radomski
f9770e93ef
Fixed iterator when erasing from inprocs multimap
2012-12-04 17:31:46 +01:00
Stefan Radomski
624dd1e5b5
Removal of terminated pipes from inproc and ignoring peer ends
2012-12-04 17:10:32 +01:00
Stefan Radomski
66c22456b9
Close pipes for inproc sockets on zmq_disconnect
...
- fixes LIBZMQ-476 and LIBZMQ-475
2012-12-04 15:14:21 +01:00
Lourens Naudé
359a505949
Prefer malloc to new for event address allocation as per Martin's recommendation
2012-11-22 00:12:17 +00:00
Lourens Naudé
b1f4850153
Let socket event messages initialize with zmq_msg_init_data and let the framework handle cleanup
2012-11-21 18:27:53 +00:00
Lourens Naudé
6d245eb6bc
Copy monitor specific event endpoints to event messages as the engine etc. can be released at anytime
2012-11-17 11:29:47 +00:00
Lourens Naudé
5205415beb
Fix addresses on triggered events
2012-11-14 09:51:24 +00:00
Martin Hurton
66dc4d8b54
Don't pass flags to xrecv method
2012-11-09 17:18:14 +01:00
Martin Hurton
7865f96e97
Don't pass flags to xsend method
2012-11-09 17:18:10 +01:00
Martin Hurton
ea19b7b658
Small cleanups
2012-11-09 14:12:11 +01:00
Martin Hurton
925a530663
Use const_cast operator to remove const modifier
2012-11-09 14:02:19 +01:00
Martin Hurton
03deb2c97a
Resolve LIBZMQ-447
2012-10-29 10:15:51 +01:00
Pieter Hintjens
4ba34c9d70
Whitespace and style fixes
2012-10-24 09:18:52 +09:00
Pieter Hintjens
96811575c3
Fixed issue #448
2012-10-18 11:04:51 +09:00
Lourens Naudé
759d453368
Significantly reworked the monitoring infrastructure with a more granular per socket API and to play well with monitoring endpoints in application threads
2012-09-21 12:53:31 +01:00
Arthur O'Dwyer
3b984d40e9
Silence all "unused parameter" warnings from Clang.
...
Compiling without warnings is a good goal, because it makes
new warnings (which probably indicate bugs) stand out rather
than getting lost in the spam.
My fixes fall into two categories:
- Adding (void) casts of unused parameters, where their
unusedness seems like a TODO (or in some cases a bug?).
- Removing parameter names altogether, where the function
is clearly a stub that will never use its parameters.
Should be no change in behavior.
2012-08-27 16:05:51 -07:00
Ian Barber
206e5f6f44
Incorrect function name in socket_base
...
VA specific monitor event in socket base was named monitor_event rather
than va_monitor_event
2012-08-26 14:29:09 +01:00
Ian Barber
f028379c1c
Incorrect var name in monitor_event
...
The call to the va version of the function was using 'event' instead of
'event_'
2012-08-26 14:27:12 +01:00
Arthur O'Dwyer
7fadd708a0
Fix monitor_event() to work at all.
...
There are three versions of monitor_event(), all taking
variadic arguments. The original code just has the first one
creating a va_list and passing that va_list variadically to
the second one... which creates a new va_list and passes it
variadically to the third one... and of course everything
blows up when we try to pull a non-va_list argument off the
stack.
The correct approach matches the C standard library's use
of printf/vprintf, scanf/vscanf, and so on. Once you make
a va_list, you must pass it only to functions which expect
a va_list parameter.
2012-08-24 16:42:31 -07:00
Martin Hurton
1ab85f471a
Exchange greeting messages for all socket types
...
Fixes #415 .
2012-08-11 19:04:49 +02:00
Martin Hurton
92827e45ee
Small code cleanup
2012-07-18 01:53:43 +02:00
Martin Hurton
86eaa9c8e7
Rewrite process_command's loop
2012-07-06 12:17:36 +02:00
Ian Barber
e5904e63ce
Allow blocking while connect() is completing
...
This patch, salvaged from a trainwreck accidental merge earlier, adds a
new sockopt, ZMQ_DELAY_ATTACH_ON_CONNECT which prevents a end point
being available to push messages to until it has fully connected, making
connect work more like bind. This also applies to reconnecting sockets,
which may cause message loss of in-queue messages, so it is sensible to
use this in conjunction with a low HWM and potentially an alternative
acknowledgement path.
Notes on most of the individual commits can be found the repository log.
2012-06-12 15:34:48 +01:00
Ian Barber
95cbad3841
Revert "After speaking with Ben Gray and the discussion on the mailing list, this is an attempt to create a sockopt to allow connecting pipes to not immediately be available for traffic. The problem is in a PUSH to many PULL situation, where there is a connect to a PULL which is not there. This connect will immediately create a pipe (unlike bind), and traffic will be load balanced to that pipe. This means if there is a persistently unavailable end point then the traffic will queue until HWM is hit, and older messages will be lost."
...
This reverts commit fe3fb419fe249d7015a6c864d18464d434a55468.
2012-06-12 14:53:57 +01:00
Ian Barber
5b167aa896
Revert "Remove the extra outpipe handling as the session is quite capable of delaying the creation of the pipe until the connection has happened. Simply don't build the pipe, and let it do that automatically."
...
This reverts commit 06485d9200ac697896dc4bd162fa4f8b4c2ddaf6.
2012-06-12 14:52:18 +01:00
Ian Barber
81b8362a59
Revert "Fix a number of whitespace issues in various parts of the code, add validation to most calls on the test and take a first stab at implementing the reconnection pipe blocking."
...
This reverts commit 6f6466f0884a169fd25a48195dd9a4e2135818e6.
2012-06-12 14:51:50 +01:00
Ian Barber
48d3977632
Revert "Fix condition so that PGM and EPGM sockets always create pipes immediately, even if delay_attach_on_connect is set. This allows passing through the icanhasall flag, and is realistic given the fact those protocols should be able to connect immediately"
...
This reverts commit b5ace39e2a48b906237d869f4f819f1a28a8cee7.
2012-06-12 14:51:33 +01:00
Ian Barber
f0920caf02
Revert "On the advice of Martin Hurton, removed the new command type and just terminated the pipe in a reconnect situation, and notified the socket of the same. This handles the blocking properly, but at the cost of potentially losing in flight messages. However, this is a reasonable trade off given how much simpler it makes the patch."
...
This reverts commit c13f1d52ff9ed51a651ad8bcc9379e82d9318e86.
2012-06-12 14:50:50 +01:00
Ian Barber
3ae68d67a4
Revert "Use the hiccup mechanism to notify the socket end of the pair of the change in state, and have it shutdown that end, and shutdown the local end normally. This seems to resolve the shutdown and race condition issues."
...
This reverts commit 67497a26439239fdb95652b46d7e4e41fe672b31.
2012-06-12 14:46:23 +01:00
Ian Barber
f5a072fee1
Revert "Code formatting, and clean up so that xhiccuped is only handled in case the pipe isn't terminating"
...
This reverts commit 5da289cd5bf0f3c367d3eb091ac66e5f4ce2b97c.
2012-06-12 14:46:01 +01:00
Ian Barber
6eeaf15179
Revert "Remove unnecessary condition in assert"
...
This reverts commit 3053f7e368149044e5d5887e78fc96c1b9f33141.
2012-06-12 14:45:36 +01:00
Ian Barber
eb14890d23
Revert "Revert "Merge branch 'master' of github.com:ianbarber/libzmq""
...
This reverts commit 029d3dfae2c2bf9e10c7f05d78593f481569bbd7.
2012-06-12 14:43:18 +01:00
Ian Barber
029d3dfae2
Revert "Merge branch 'master' of github.com:ianbarber/libzmq"
...
This reverts commit 33459029793474d14cdb48f85ad2c58dc7ed156f, reversing
changes made to 889b0e6f29f0cce566339b13b8a44f3b97836b6e.
2012-06-12 14:13:17 +01:00
Ian Barber
3053f7e368
Remove unnecessary condition in assert
2012-06-09 00:08:14 +01:00
Ian Barber
5da289cd5b
Code formatting, and clean up so that xhiccuped is only handled in case the pipe isn't terminating
2012-06-09 00:07:30 +01:00