remove dead file

This commit is contained in:
Benjamin Sergeant 2019-01-06 14:26:11 -08:00
parent aed2356fc1
commit a21aae521f
3 changed files with 2 additions and 32 deletions

View File

@ -1,31 +0,0 @@
/*
* IXSetThreadName.cpp
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone, Inc. All rights reserved.
*/
#include "IXSetThreadName.h"
#include <pthread.h>
namespace ix
{
void setThreadName(const std::string& name)
{
#if defined(__linux__)
//
// Linux only reserve 16 bytes for its thread names
// See prctl and PR_SET_NAME property in
// http://man7.org/linux/man-pages/man2/prctl.2.html
//
pthread_setname_np(pthread_self(),
name.substr(0, 15).c_str());
#elif defined(__APPLE__)
//
// Apple is more generous with 64 chars.
// notice how the Apple version does not take a pthread_t argument
//
pthread_setname_np(name.substr(0, 63).c_str());
#elif
#error("Unsupported platform");
#endif
}
}

View File

@ -116,7 +116,7 @@ namespace ix
std::cout << "-------------------------------" << std::endl; std::cout << "-------------------------------" << std::endl;
} }
std::string trim(const std::string& str) std::string WebSocketHandshake::trim(const std::string& str)
{ {
std::string out(str); std::string out(str);
out.erase(std::remove(out.begin(), out.end(), ' '), out.end()); out.erase(std::remove(out.begin(), out.end(), ' '), out.end());

View File

@ -75,6 +75,7 @@ namespace ix
WebSocketInitResult sendErrorResponse(int code, const std::string& reason); WebSocketInitResult sendErrorResponse(int code, const std::string& reason);
std::tuple<std::string, std::string, std::string> parseRequestLine(const std::string& line); std::tuple<std::string, std::string, std::string> parseRequestLine(const std::string& line);
std::string trim(const std::string& str);
std::atomic<bool>& _requestInitCancellation; std::atomic<bool>& _requestInitCancellation;
std::shared_ptr<Socket> _socket; std::shared_ptr<Socket> _socket;