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
8cd64b76
Commit
8cd64b76
authored
May 15, 2016
by
Bitiquinho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt to new draft header. Rebase dgram socket on pair socket
parent
23b3403f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
35 deletions
+12
-35
dgram.cpp
src/dgram.cpp
+0
-0
dgram.hpp
src/dgram.hpp
+12
-35
No files found.
src/dgram.cpp
View file @
8cd64b76
This diff is collapsed.
Click to expand it.
src/dgram.hpp
View file @
8cd64b76
...
...
@@ -30,15 +30,17 @@
#ifndef __ZMQ_DGRAM_HPP_INCLUDED__
#define __ZMQ_DGRAM_HPP_INCLUDED__
#include
<map>
#include "
router
.hpp"
#include
"blob.hpp"
#include "socket_base.hpp"
#include "
session_base
.hpp"
namespace
zmq
{
class
ctx_t
;
class
msg_t
;
class
pipe_t
;
class
io_thread_t
;
class
dgram_t
:
public
socket_base_t
...
...
@@ -54,50 +56,25 @@ namespace zmq
int
xrecv
(
zmq
::
msg_t
*
msg_
);
bool
xhas_in
();
bool
xhas_out
();
blob_t
get_credential
()
const
;
void
xread_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xwrite_activated
(
zmq
::
pipe_t
*
pipe_
);
void
xpipe_terminated
(
zmq
::
pipe_t
*
pipe_
);
int
xsetsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
);
private
:
// Generate peer's id and update lookup map
void
identify_peer
(
pipe_t
*
pipe_
);
// Fair queueing object for inbound pipes.
fq_t
fq
;
zmq
::
pipe_t
*
pipe
;
zmq
::
pipe_t
*
last_in
;
blob_t
saved_credential
;
// True iff there is a message held in the pre-fetch buffer.
bool
prefetched
;
// If true, the receiver got the message part with
// the peer's identity.
bool
identity_sent
;
// Holds the prefetched identity.
msg_t
prefetched_id
;
// Holds the prefetched message.
msg_t
prefetched_msg
;
struct
outpipe_t
{
zmq
::
pipe_t
*
pipe
;
bool
active
;
};
// Outbound pipes indexed by the peer IDs.
typedef
std
::
map
<
blob_t
,
outpipe_t
>
outpipes_t
;
outpipes_t
outpipes
;
// The pipe we are currently writing to.
zmq
::
pipe_t
*
current_out
;
// If true, more outgoing message parts are expected.
bool
more_out
;
// Routing IDs are generated. It's a simple increment and wrap-over
// algorithm. This value is the next ID to use (if not used already).
uint32_t
next_rid
;
dgram_t
(
const
dgram_t
&
);
const
dgram_t
&
operator
=
(
const
dgram_t
&
);
};
...
...
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