add some debug output to RemoteUI

This commit is contained in:
Maxime Coste 2012-11-19 19:06:32 +01:00
parent 3e53ebb5d6
commit fe98ba7494
2 changed files with 14 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include "remote.hh"
#include "display_buffer.hh"
#include "debug.hh"
#include <sys/types.h>
#include <sys/socket.h>
@ -153,6 +154,17 @@ DisplayBuffer read<DisplayBuffer>(int socket)
return db;
}
RemoteUI::RemoteUI(int socket)
: m_socket(socket)
{
write_debug("remote client connected: " + int_to_str(m_socket));
}
RemoteUI::~RemoteUI()
{
write_debug("remote client disconnected: " + int_to_str(m_socket));
}
void RemoteUI::print_status(const String& status, CharCount cursor_pos)
{
Message msg(m_socket);

View File

@ -12,7 +12,8 @@ struct peer_disconnected {};
class RemoteUI : public UserInterface
{
public:
RemoteUI(int socket) : m_socket(socket) {}
RemoteUI(int socket);
~RemoteUI();
void print_status(const String& status, CharCount cursor_pos) override;
void menu_show(const memoryview<String>& choices,