-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
86 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
#pragma once | ||
#include <chrono> | ||
#include <thread> | ||
#include "httppeer.h" | ||
|
||
namespace http | ||
{ | ||
|
||
|
||
std::string teststr2int(std::shared_ptr<httppeer> peer); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include <chrono> | ||
#include <thread> | ||
#include <vector> | ||
#include <list> | ||
#include "httppeer.h" | ||
#include "teststr2int.h" | ||
#include "func.h" | ||
namespace http | ||
{ | ||
//@urlpath(null,teststr2int) | ||
std::string teststr2int(std::shared_ptr<httppeer> peer) | ||
{ | ||
httppeer &client = peer->getpeer(); | ||
std::string a = "-123456789"; | ||
client << "<p>str2int origin|" << a << "|</p>"; | ||
client << "<p>str2int result|" << str2int(a) << "|</p>"; | ||
a = "123456789"; | ||
client << "<p>str2int not result|" << str2int(a) << "|</p>"; | ||
client << "<p>str2int data(),size() result|" << str2int(a.data(), a.size()) << "|</p>"; | ||
client << "<p>char2hex result|" << char2hex((const unsigned char *)a.data(), a.size()) << "|</p>"; | ||
client << "<p>char2hex 4p result|" << char2hex((const unsigned char *)a.data(), a.size(), 4) << "|</p>"; | ||
return ""; | ||
} | ||
|
||
}// namespace http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters