forked from mnisjk/cppWebSockets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Util.h
36 lines (30 loc) · 906 Bytes
/
Util.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/** --------------------------------------------------------------------------
* Util.h
*
* A few very basic utility functions for WebSocketServer
*
* Author : Jason Kruse <[email protected]> or @mnisjk
* Copyright : 2014
* License : BSD (see LICENSE)
* --------------------------------------------------------------------------
**/
#ifndef UTIL_H
#define UTIL_H
#include <iostream>
#include <sstream>
#include <string>
#include <syslog.h>
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
/// Util
/// ---------
class Util
{
public:
static void log( const std::string& message );
static void log( const char* message );
template<typename T>
static inline std::string toString(T t) { std::stringstream s; s << t; return s.str(); }
};
// Util.h
#endif