Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
311f4d00
Commit
311f4d00
authored
Jul 08, 2015
by
Constantin Rack
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1472 from reunanen/allow-explicitly-setting-buf-sizes-to-0
Allow explicitly setting buf sizes to 0
parents
72a94881
7362f3af
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
22 deletions
+18
-22
zmq_getsockopt.txt
doc/zmq_getsockopt.txt
+4
-8
zmq_setsockopt.txt
doc/zmq_setsockopt.txt
+4
-4
options.cpp
src/options.cpp
+2
-2
pgm_socket.cpp
src/pgm_socket.cpp
+2
-2
socks_connecter.cpp
src/socks_connecter.cpp
+2
-2
tcp_connecter.cpp
src/tcp_connecter.cpp
+2
-2
tcp_listener.cpp
src/tcp_listener.cpp
+2
-2
No files found.
doc/zmq_getsockopt.txt
View file @
311f4d00
...
...
@@ -450,14 +450,12 @@ Applicable socket types:: all, when using multicast transports
ZMQ_RCVBUF: Retrieve kernel receive buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer
size for the specified 'socket'. A value of zero means that the OS default is
in effect. For details refer to your operating system documentation for the
'SO_RCVBUF' socket option.
size for the specified 'socket'. For details refer to your operating system
documentation for the 'SO_RCVBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value:: 0
Applicable socket types:: all
...
...
@@ -566,14 +564,12 @@ Applicable socket types:: all, when using multicast transports
ZMQ_SNDBUF: Retrieve kernel transmit buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer
size for the specified 'socket'. A value of zero means that the OS default is
in effect. For details refer to your operating system documentation for the
'SO_SNDBUF' socket option.
size for the specified 'socket'. For details refer to your operating system
documentation for the 'SO_SNDBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value:: 0
Applicable socket types:: all
...
...
doc/zmq_setsockopt.txt
View file @
311f4d00
...
...
@@ -469,14 +469,14 @@ Applicable socket types:: all, when using multicast transports
ZMQ_RCVBUF: Set kernel receive buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for
the 'socket' to the specified size in bytes. A value of
zero
means leave the
the 'socket' to the specified size in bytes. A value of
-1
means leave the
OS default unchanged. For details refer to your operating system documentation
for the 'SO_RCVBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value::
0
Default value::
-1
Applicable socket types:: all
...
...
@@ -660,14 +660,14 @@ Applicable socket types:: ZMQ_ROUTER
ZMQ_SNDBUF: Set kernel transmit buffer size
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size
for the 'socket' to the specified size in bytes. A value of
zero
means leave
for the 'socket' to the specified size in bytes. A value of
-1
means leave
the OS default unchanged. For details please refer to your operating system
documentation for the 'SO_SNDBUF' socket option.
[horizontal]
Option value type:: int
Option value unit:: bytes
Default value::
0
Default value::
-1
Applicable socket types:: all
...
...
src/options.cpp
View file @
311f4d00
...
...
@@ -41,8 +41,8 @@ zmq::options_t::options_t () :
rate
(
100
),
recovery_ivl
(
10000
),
multicast_hops
(
1
),
sndbuf
(
0
),
rcvbuf
(
0
),
sndbuf
(
-
1
),
rcvbuf
(
-
1
),
tos
(
0
),
type
(
-
1
),
linger
(
-
1
),
...
...
src/pgm_socket.cpp
View file @
311f4d00
...
...
@@ -196,14 +196,14 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
{
const
int
rcvbuf
=
(
int
)
options
.
rcvbuf
;
if
(
rcvbuf
)
{
if
(
rcvbuf
>=
0
)
{
if
(
!
pgm_setsockopt
(
sock
,
SOL_SOCKET
,
SO_RCVBUF
,
&
rcvbuf
,
sizeof
(
rcvbuf
)))
goto
err_abort
;
}
const
int
sndbuf
=
(
int
)
options
.
sndbuf
;
if
(
sndbuf
)
{
if
(
sndbuf
>=
0
)
{
if
(
!
pgm_setsockopt
(
sock
,
SOL_SOCKET
,
SO_SNDBUF
,
&
sndbuf
,
sizeof
(
sndbuf
)))
goto
err_abort
;
...
...
src/socks_connecter.cpp
View file @
311f4d00
...
...
@@ -340,9 +340,9 @@ int zmq::socks_connecter_t::connect_to_proxy ()
unblock_socket
(
s
);
// Set the socket buffer limits for the underlying socket.
if
(
options
.
sndbuf
!
=
0
)
if
(
options
.
sndbuf
>
=
0
)
set_tcp_send_buffer
(
s
,
options
.
sndbuf
);
if
(
options
.
rcvbuf
!
=
0
)
if
(
options
.
rcvbuf
>
=
0
)
set_tcp_receive_buffer
(
s
,
options
.
rcvbuf
);
// Set the IP Type-Of-Service for the underlying socket
...
...
src/tcp_connecter.cpp
View file @
311f4d00
...
...
@@ -258,9 +258,9 @@ int zmq::tcp_connecter_t::open ()
unblock_socket
(
s
);
// Set the socket buffer limits for the underlying socket.
if
(
options
.
sndbuf
!
=
0
)
if
(
options
.
sndbuf
>
=
0
)
set_tcp_send_buffer
(
s
,
options
.
sndbuf
);
if
(
options
.
rcvbuf
!
=
0
)
if
(
options
.
rcvbuf
>
=
0
)
set_tcp_receive_buffer
(
s
,
options
.
rcvbuf
);
// Set the IP Type-Of-Service for the underlying socket
...
...
src/tcp_listener.cpp
View file @
311f4d00
...
...
@@ -207,9 +207,9 @@ int zmq::tcp_listener_t::set_address (const char *addr_)
set_ip_type_of_service
(
s
,
options
.
tos
);
// Set the socket buffer limits for the underlying socket.
if
(
options
.
sndbuf
!
=
0
)
if
(
options
.
sndbuf
>
=
0
)
set_tcp_send_buffer
(
s
,
options
.
sndbuf
);
if
(
options
.
rcvbuf
!
=
0
)
if
(
options
.
rcvbuf
>
=
0
)
set_tcp_receive_buffer
(
s
,
options
.
rcvbuf
);
// Allow reusing of the address.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment