Skip to content

Commit

Permalink
Fix web example issues.
Browse files Browse the repository at this point in the history
- Contact(name) -> Contact contact(name)
- ConstString::toString -> std::stringstream implementation
  • Loading branch information
jgvictores committed Nov 20, 2017
1 parent 82cf50a commit 2ffd5c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions example/web/web_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) {
Responder responder;
server.setReader(responder);

Contact(name);
Contact contact(name);
if (port_number!=0) {
contact.setSocket("", "", port_number);
}
Expand All @@ -95,7 +95,9 @@ int main(int argc, char *argv[]) {
}
Bottle push;
push.addString("web");
ConstString div = ConstString("<div>")+ConstString::toString(at)+
std::stringstream ss;
ss << at;
ConstString div = ConstString("<div>")+ss.str()+
" potatoes</div>";
push.addString(div);
server.write(push);
Expand Down

0 comments on commit 2ffd5c4

Please sign in to comment.