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
b86b2f85
Commit
b86b2f85
authored
Sep 30, 2020
by
legoc
Browse files
(split2) Added endOfLine member in application stream events
parent
d42042df
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cameo/OutputStreamSocket.cpp
View file @
b86b2f85
...
...
@@ -28,7 +28,7 @@ using namespace std;
namespace
cameo
{
Output
::
Output
()
:
m_id
(
0
)
{
m_id
(
0
)
,
m_endOfLine
(
false
)
{
}
int
Output
::
getId
()
const
{
...
...
@@ -39,6 +39,10 @@ const std::string& Output::getMessage() const {
return
m_message
;
}
bool
Output
::
isEndOfLine
()
const
{
return
m_endOfLine
;
}
OutputStreamSocket
::
OutputStreamSocket
(
StreamSocketImpl
*
impl
)
:
m_ended
(
false
),
m_canceled
(
false
),
...
...
@@ -73,9 +77,11 @@ bool OutputStreamSocket::receive(Output& output) {
int
id
=
event
[
message
::
ApplicationStream
::
ID
].
GetInt
();
string
line
=
event
[
message
::
ApplicationStream
::
MESSAGE
].
GetString
();
bool
endOfLine
=
event
[
message
::
ApplicationStream
::
EOL
].
GetBool
();
output
.
m_id
=
id
;
output
.
m_message
=
line
;
output
.
m_endOfLine
=
endOfLine
;
return
true
;
}
...
...
src/cameo/OutputStreamSocket.h
View file @
b86b2f85
...
...
@@ -40,10 +40,12 @@ public:
int
getId
()
const
;
const
std
::
string
&
getMessage
()
const
;
bool
isEndOfLine
()
const
;
private:
int
m_id
;
std
::
string
m_message
;
bool
m_endOfLine
;
};
...
...
src/cameo/message/Message.h
View file @
b86b2f85
...
...
@@ -140,6 +140,7 @@ namespace message {
namespace
ApplicationStream
{
constexpr
const
char
*
ID
=
"id"
;
// required int32 id = 1;
constexpr
const
char
*
MESSAGE
=
"message"
;
// required string message = 2;
constexpr
const
char
*
EOL
=
"eol"
;
// boolean
}
namespace
SendParametersRequest
{
...
...
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