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
daadb65a
Commit
daadb65a
authored
Aug 15, 2018
by
Simon Giesecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: inconsistency of using terms address and uri
Solution: use terms more consistently
parent
cdc6c66f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
25 deletions
+31
-25
socket_base.cpp
src/socket_base.cpp
+0
-0
socket_base.hpp
src/socket_base.hpp
+31
-25
No files found.
src/socket_base.cpp
View file @
daadb65a
This diff is collapsed.
Click to expand it.
src/socket_base.hpp
View file @
daadb65a
...
...
@@ -82,9 +82,9 @@ class socket_base_t : public own_t,
// Interface for communication with the API layer.
int
setsockopt
(
int
option_
,
const
void
*
optval_
,
size_t
optvallen_
);
int
getsockopt
(
int
option_
,
void
*
optval_
,
size_t
*
optvallen_
);
int
bind
(
const
char
*
addr
_
);
int
connect
(
const
char
*
addr
_
);
int
term_endpoint
(
const
char
*
addr
_
);
int
bind
(
const
char
*
endpoint_uri
_
);
int
connect
(
const
char
*
endpoint_uri
_
);
int
term_endpoint
(
const
char
*
endpoint_uri
_
);
int
send
(
zmq
::
msg_t
*
msg_
,
int
flags_
);
int
recv
(
zmq
::
msg_t
*
msg_
,
int
flags_
);
void
add_signaler
(
signaler_t
*
s_
);
...
...
@@ -120,20 +120,24 @@ class socket_base_t : public own_t,
int
monitor
(
const
char
*
endpoint_
,
int
events_
);
void
event_connected
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_connect_delayed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_connect_retried
(
const
std
::
string
&
addr_
,
int
interval_
);
void
event_listening
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_bind_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_accepted
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_accept_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_closed
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_close_failed
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_disconnected
(
const
std
::
string
&
addr_
,
zmq
::
fd_t
fd_
);
void
event_handshake_failed_no_detail
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_failed_protocol
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_failed_auth
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_handshake_succeeded
(
const
std
::
string
&
addr_
,
int
err_
);
void
event_connected
(
const
std
::
string
&
endpoint_uri_
,
zmq
::
fd_t
fd_
);
void
event_connect_delayed
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_connect_retried
(
const
std
::
string
&
endpoint_uri_
,
int
interval_
);
void
event_listening
(
const
std
::
string
&
endpoint_uri_
,
zmq
::
fd_t
fd_
);
void
event_bind_failed
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_accepted
(
const
std
::
string
&
endpoint_uri_
,
zmq
::
fd_t
fd_
);
void
event_accept_failed
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_closed
(
const
std
::
string
&
endpoint_uri_
,
zmq
::
fd_t
fd_
);
void
event_close_failed
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_disconnected
(
const
std
::
string
&
endpoint_uri_
,
zmq
::
fd_t
fd_
);
void
event_handshake_failed_no_detail
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_handshake_failed_protocol
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_handshake_failed_auth
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
void
event_handshake_succeeded
(
const
std
::
string
&
endpoint_uri_
,
int
err_
);
// Query the state of a specific peer. The default implementation
// always returns an ENOTSUP error.
...
...
@@ -182,17 +186,19 @@ class socket_base_t : public own_t,
private
:
// test if event should be sent and then dispatch it
void
event
(
const
std
::
string
&
addr
_
,
intptr_t
value_
,
int
type_
);
void
event
(
const
std
::
string
&
endpoint_uri
_
,
intptr_t
value_
,
int
type_
);
// Socket event data dispatch
void
monitor_event
(
int
event_
,
intptr_t
value_
,
const
std
::
string
&
addr_
)
const
;
void
monitor_event
(
int
event_
,
intptr_t
value_
,
const
std
::
string
&
endpoint_uri_
)
const
;
// Monitor socket cleanup
void
stop_monitor
(
bool
send_monitor_stopped_event_
=
true
);
// Creates new endpoint ID and adds the endpoint to the map.
void
add_endpoint
(
const
char
*
addr_
,
own_t
*
endpoint_
,
pipe_t
*
pipe_
);
void
add_endpoint
(
const
char
*
endpoint_uri_
,
own_t
*
endpoint_
,
pipe_t
*
pipe_
);
// Map of open endpoints.
typedef
std
::
pair
<
own_t
*
,
pipe_t
*>
endpoint_pipe_t
;
...
...
@@ -203,8 +209,8 @@ class socket_base_t : public own_t,
class
inprocs_t
{
public
:
void
emplace
(
const
char
*
addr
_
,
pipe_t
*
pipe_
);
int
erase_pipes
(
const
std
::
string
&
addr
_str_
);
void
emplace
(
const
char
*
endpoint_uri
_
,
pipe_t
*
pipe_
);
int
erase_pipes
(
const
std
::
string
&
endpoint_uri
_str_
);
void
erase_pipe
(
pipe_t
*
pipe_
);
private
:
...
...
@@ -234,7 +240,7 @@ class socket_base_t : public own_t,
// Parse URI string.
static
int
parse_uri
(
const
char
*
uri_
,
std
::
string
&
protocol_
,
std
::
string
&
address
_
);
parse_uri
(
const
char
*
uri_
,
std
::
string
&
protocol_
,
std
::
string
&
path
_
);
// Check whether transport protocol, as specified in connect or
// bind, is available and compatible with the socket type.
...
...
@@ -259,7 +265,7 @@ class socket_base_t : public own_t,
void
update_pipe_options
(
int
option_
);
std
::
string
resolve_tcp_addr
(
std
::
string
endpoint_
address
_
,
std
::
string
resolve_tcp_addr
(
std
::
string
endpoint_
uri
_
,
const
char
*
tcp_address_
);
// Socket's mailbox object.
...
...
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