mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
WebSocketServer: Rename sessionDuration
to connectedAt
This commit is contained in:
parent
0af2724ee9
commit
11913dac76
@ -42,10 +42,10 @@ class WebSocketServer
|
||||
MsgPack
|
||||
};
|
||||
|
||||
struct WebSocketState {
|
||||
struct WebSocketSessionState {
|
||||
websocketpp::connection_hdl hdl;
|
||||
std::string remoteAddress;
|
||||
uint64_t durationSeconds;
|
||||
uint64_t connectedAt;
|
||||
uint64_t incomingMessages;
|
||||
uint64_t outgoingMessages;
|
||||
};
|
||||
@ -61,7 +61,7 @@ class WebSocketServer
|
||||
return _server.is_listening();
|
||||
}
|
||||
|
||||
std::vector<WebSocketState> GetWebSocketSessions();
|
||||
std::vector<WebSocketSessionState> GetWebSocketSessions();
|
||||
|
||||
QThreadPool *GetThreadPool() {
|
||||
return &_threadPool;
|
||||
|
@ -77,7 +77,8 @@ void SettingsDialog::FillSessionTable()
|
||||
QTableWidgetItem *addressItem = new QTableWidgetItem(QString::fromStdString(session.remoteAddress));
|
||||
ui->websocketSessionTable->setItem(i, 0, addressItem);
|
||||
|
||||
QTableWidgetItem *durationItem = new QTableWidgetItem(QTime(0, 0, session.durationSeconds).toString("hh:mm:ss"));
|
||||
uint64_t sessionDuration = QDateTime::toTime_t() - session.connectedAt;
|
||||
QTableWidgetItem *durationItem = new QTableWidgetItem(QTime(0, 0, sessionDuration).toString("hh:mm:ss"));
|
||||
ui->websocketSessionTable->setItem(i, 1, durationItem);
|
||||
|
||||
QTableWidgetItem *statsItem = new QTableWidgetItem(QString("%1/%2").arg(session.incomingMessages).arg(session.outgoingMessages));
|
||||
|
Loading…
Reference in New Issue
Block a user