Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pw0rld committed Apr 10, 2023
1 parent cd9bbe7 commit e5ae253
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions AppEnclave/host/network/My_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,12 @@ void tcp_server::setup_secure_channel_to_server()
// init the state at SE if not setup previously
void tcp_server::send_client_requests(size_t message_type)
{

int64_t times = ser->print_time();
// cout << "Start to send_client_requests.And milliseconds time is " << times << endl;
string msg = create_client_message(cl_enclave, message_type);
// cout << "End to send_client_requests.And milliseconds time is " << ser->print_time() << endl;
int64_t times = ser->print_time();
load_application_state(cl_enclave);
// int64_t times = ser->print_time();
// load_application_state(cl_enclave);
if (msg.compare("-1") != 0)
{
ser->index_message++;
Expand Down
18 changes: 9 additions & 9 deletions AppEnclave/host/network/process_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,16 +175,16 @@ void process_buffer(string &m, tcp_server *ser, oe_enclave_t *attester_enclaves)
// Update Requests
ser->isRequestPending = false;
string back_message = sp[4];
back_message.erase(0, 2);
back_message.erase(back_message.find("@"), back_message.find("]"));
// back_message.erase(0, 2);
// back_message.erase(back_message.find("@"), back_message.find("]"));
int64_t old_time = 0;
std::stringstream ss; // Pengw String cover to int64_t
ss << back_message;
ss >> old_time;
int64_t new_time = ser->print_time();
int64_t gap = new_time - old_time;
// cout << "Finish to updateCounter.And milliseconds time is send_time " << old_time << " back_message" << back_message << endl;
cout << "gap is " << gap << " new_time " << new_time << endl;
// std::stringstream ss; // Pengw String cover to int64_t
// ss << back_message;
// ss >> old_time;
// int64_t new_time = ser->print_time();
// int64_t gap = new_time - old_time;
cout << "Finish to updateCounter.And milliseconds time is send_time " << old_time << " back_message" << back_message << endl;
// cout << "gap is " << gap << " new_time " << new_time << endl;
}
else
{
Expand Down

0 comments on commit e5ae253

Please sign in to comment.