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
0d704fce
Commit
0d704fce
authored
Dec 01, 2009
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MSVC warnings fixed
parent
9cff475a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
pipe.cpp
src/pipe.cpp
+24
-8
pipe.hpp
src/pipe.hpp
+4
-2
No files found.
src/pipe.cpp
View file @
0d704fce
...
...
@@ -21,11 +21,11 @@
#include "pipe.hpp"
zmq
::
reader_t
::
reader_t
(
object_t
*
parent_
,
pipe_t
*
pipe_
,
zmq
::
reader_t
::
reader_t
(
object_t
*
parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
)
:
object_t
(
parent_
),
pipe
(
pipe_
),
peer
(
&
pipe_
->
writer
),
pipe
(
NULL
),
peer
(
NULL
),
hwm
(
hwm_
),
lwm
(
lwm_
),
endpoint
(
NULL
)
...
...
@@ -36,6 +36,13 @@ zmq::reader_t::~reader_t ()
{
}
void
zmq
::
reader_t
::
set_pipe
(
pipe_t
*
pipe_
)
{
zmq_assert
(
!
pipe
);
pipe
=
pipe_
;
peer
=
&
pipe_
->
writer
;
}
bool
zmq
::
reader_t
::
check_read
()
{
// Check if there's an item in the pipe.
...
...
@@ -94,11 +101,11 @@ void zmq::reader_t::process_pipe_term_ack ()
delete
pipe
;
}
zmq
::
writer_t
::
writer_t
(
object_t
*
parent_
,
pipe_t
*
pipe_
,
zmq
::
writer_t
::
writer_t
(
object_t
*
parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
)
:
object_t
(
parent_
),
pipe
(
pipe_
),
peer
(
&
pipe_
->
reader
),
pipe
(
NULL
),
peer
(
NULL
),
hwm
(
hwm_
),
lwm
(
lwm_
),
endpoint
(
NULL
)
...
...
@@ -114,6 +121,13 @@ zmq::writer_t::~writer_t ()
{
}
void
zmq
::
writer_t
::
set_pipe
(
pipe_t
*
pipe_
)
{
zmq_assert
(
!
pipe
);
pipe
=
pipe_
;
peer
=
&
pipe_
->
reader
;
}
bool
zmq
::
writer_t
::
check_write
(
uint64_t
size_
)
{
// TODO: Check whether hwm is exceeded.
...
...
@@ -161,9 +175,11 @@ void zmq::writer_t::process_pipe_term ()
zmq
::
pipe_t
::
pipe_t
(
object_t
*
reader_parent_
,
object_t
*
writer_parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
)
:
reader
(
reader_parent_
,
this
,
hwm_
,
lwm_
),
writer
(
writer_parent_
,
this
,
hwm_
,
lwm_
)
reader
(
reader_parent_
,
hwm_
,
lwm_
),
writer
(
writer_parent_
,
hwm_
,
lwm_
)
{
reader
.
set_pipe
(
this
);
writer
.
set_pipe
(
this
);
reader
.
register_pipe
(
this
);
}
...
...
src/pipe.hpp
View file @
0d704fce
...
...
@@ -36,10 +36,11 @@ namespace zmq
{
public
:
reader_t
(
class
object_t
*
parent_
,
class
pipe_t
*
pipe_
,
reader_t
(
class
object_t
*
parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
);
~
reader_t
();
void
set_pipe
(
class
pipe_t
*
pipe_
);
void
set_endpoint
(
i_endpoint
*
endpoint_
);
// Returns true if there is at least one message to read in the pipe.
...
...
@@ -83,10 +84,11 @@ namespace zmq
{
public
:
writer_t
(
class
object_t
*
parent_
,
class
pipe_t
*
pipe_
,
writer_t
(
class
object_t
*
parent_
,
uint64_t
hwm_
,
uint64_t
lwm_
);
~
writer_t
();
void
set_pipe
(
class
pipe_t
*
pipe_
);
void
set_endpoint
(
i_endpoint
*
endpoint_
);
// Checks whether message with specified size can be written to the
...
...
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