Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
6667754d
Commit
6667754d
authored
Jan 27, 2016
by
legoc
Browse files
Remove host endpoint to simplify as it was useless
parent
15e503b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cameo/Application.cpp
View file @
6667754d
...
...
@@ -86,7 +86,7 @@ void This::init(int argc, char *argv[]) {
std
::
string
This
::
getReference
()
{
if
(
m_instance
!=
0
)
{
ostringstream
os
;
os
<<
getName
()
<<
"."
<<
getId
()
<<
"@"
<<
get
Host
Endpoint
();
os
<<
getName
()
<<
"."
<<
getId
()
<<
"@"
<<
getEndpoint
();
return
os
.
str
();
}
return
""
;
...
...
@@ -119,9 +119,10 @@ This::This(int argc, char *argv[]) :
string
port
=
tokens
[
2
];
istringstream
is
(
port
);
is
>>
m_port
;
m_hostEndpoint
=
m_url
+
":"
+
port
;
m_url
=
"tcp://localhost"
;
// We separated host endpoint and server in the past (server being tcp://localhost)
// but that generates troubles when two applications communicate remotely.
// However leave the same value seems to be ok.
m_serverEndpoint
=
m_url
+
":"
+
port
;
string
nameId
=
tokens
[
3
];
...
...
@@ -181,9 +182,9 @@ int This::getTimeout() {
return
m_instance
->
Services
::
getTimeout
();
}
const
std
::
string
&
This
::
get
Host
Endpoint
()
{
const
std
::
string
&
This
::
getEndpoint
()
{
if
(
m_instance
!=
0
)
{
return
m_instance
->
m_
host
Endpoint
;
return
m_instance
->
m_
server
Endpoint
;
}
static
string
result
;
return
result
;
...
...
@@ -1203,7 +1204,7 @@ std::ostream& operator<<(std::ostream& os, const application::Responder& respond
os
<<
"rep."
<<
responder
.
getName
()
<<
":"
<<
responder
.
m_impl
->
m_application
->
getName
()
<<
"."
<<
responder
.
m_impl
->
m_application
->
getId
()
<<
"@"
<<
responder
.
m_impl
->
m_application
->
get
Host
Endpoint
();
<<
"@"
<<
responder
.
m_impl
->
m_application
->
getEndpoint
();
return
os
;
}
...
...
@@ -1213,7 +1214,7 @@ std::ostream& operator<<(std::ostream& os, const application::Requester& request
os
<<
"req."
<<
requester
.
getName
()
<<
":"
<<
requester
.
m_impl
->
m_application
->
getName
()
<<
"."
<<
requester
.
m_impl
->
m_application
->
getId
()
<<
"@"
<<
requester
.
m_impl
->
m_application
->
get
Host
Endpoint
();
<<
"@"
<<
requester
.
m_impl
->
m_application
->
getEndpoint
();
return
os
;
}
...
...
src/cameo/Application.h
View file @
6667754d
...
...
@@ -99,7 +99,7 @@ public:
static
int
getId
();
static
void
setTimeout
(
int
timeout
);
static
int
getTimeout
();
static
const
std
::
string
&
get
Host
Endpoint
();
static
const
std
::
string
&
getEndpoint
();
static
Server
&
getServer
();
/**
...
...
@@ -150,7 +150,6 @@ private:
void
handleStopImpl
(
StopFunctionType
function
);
ApplicationImpl
*
m_impl
;
std
::
string
m_hostEndpoint
;
std
::
string
m_name
;
int
m_id
;
...
...
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