@@ -39,9 +39,9 @@ void wssautobahntest() {
3939 });
4040
4141 listener.startlistening ();
42-
43- SL::WS_LITE::WSContext tlsctx (SL::WS_LITE::ThreadCount (1 ));
44-
42+
43+ SL::WS_LITE::WSContext tlsctx (SL::WS_LITE::ThreadCount (1 ));
44+
4545 auto tlslistener = tlsctx.CreateTLSListener (SL::WS_LITE::PortNumber (3001 ), TEST_CERTIFICATE_PRIVATE_PASSWORD, TEST_CERTIFICATE_PRIVATE_PATH, TEST_CERTIFICATE_PUBLIC_PATH, TEST_DH_PATH);
4646 tlslistener.set_ReadTimeout (std::chrono::seconds (100 ));
4747 tlslistener.set_WriteTimeout (std::chrono::seconds (100 ));
@@ -199,7 +199,7 @@ void multithreadtest() {
199199 });
200200 listener.onDisconnection ([&](const SL::WS_LITE::WSocket& socket, unsigned short code, const std::string& msg) {
201201 lastheard = std::chrono::high_resolution_clock::now ();
202- });
202+ });
203203 listener.onMessage ([&](const SL::WS_LITE::WSocket& socket, const SL::WS_LITE::WSMessage& message) {
204204 lastheard = std::chrono::high_resolution_clock::now ();
205205 SL::WS_LITE::WSMessage msg;
@@ -239,7 +239,7 @@ void multithreadtest() {
239239 lastheard = std::chrono::high_resolution_clock::now ();
240240 });
241241 clients[i].connect (" localhost" , port);
242-
242+
243243 }
244244
245245 while (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now () - lastheard).count () < 2000 ) {
@@ -295,9 +295,9 @@ void multithreadthroughputtest() {
295295 msg.Buffer = std::shared_ptr<unsigned char >(new unsigned char [bufferesize], [&](unsigned char * p) {
296296 mbssent += bufferesize;
297297 if (mbssent == bufferesize * clients.capacity ()) {
298- std::cout << " Took " << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now ()- sendtimer).count () << " ms to send " << bufferesize * clients.capacity () <<" bytes" << std::endl;
298+ std::cout << " Took " << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now () - sendtimer).count () << " ms to send " << bufferesize * clients.capacity () << " bytes" << std::endl;
299299 }
300- delete[] p;
300+ delete[] p;
301301 });
302302 msg.len = bufferesize;// 10MB
303303 msg.code = SL::WS_LITE::OpCode::BINARY;
@@ -316,7 +316,7 @@ void multithreadthroughputtest() {
316316 while (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now () - lastheard).count () < 5000 ) {
317317 std::this_thread::sleep_for (200ms);
318318 }
319- std::cout << " Received " << mbsreceived<< " bytes" << std::endl;
319+ std::cout << " Received " << mbsreceived << " bytes" << std::endl;
320320}
321321int main (int argc, char * argv[]) {
322322 wssautobahntest ();
0 commit comments