Feature/connection state (#25)
* (cmake) add a warning about 32/64 conversion problems. * fix typo * New connection state for server code + fix OpenSSL double init bug * update README
This commit is contained in:
committed by
GitHub
parent
0635313566
commit
eac611ab1e
33
ixwebsocket/IXConnectionState.h
Normal file
33
ixwebsocket/IXConnectionState.h
Normal file
@ -0,0 +1,33 @@
|
||||
/*
|
||||
* IXConnectionState.h
|
||||
* Author: Benjamin Sergeant
|
||||
* Copyright (c) 2019 Machine Zone, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
|
||||
namespace ix
|
||||
{
|
||||
class ConnectionState {
|
||||
public:
|
||||
ConnectionState();
|
||||
virtual ~ConnectionState() = default;
|
||||
|
||||
virtual void computeId();
|
||||
virtual const std::string& getId() const;
|
||||
|
||||
static std::shared_ptr<ConnectionState> createConnectionState();
|
||||
|
||||
protected:
|
||||
std::string _id;
|
||||
|
||||
static std::atomic<uint64_t> _globalId;
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user