Deskflow 1.24.0.365
Keyboard and mouse sharing utility
Loading...
Searching...
No Matches
IDataSocket.h
Go to the documentation of this file.
1/*
2 * Deskflow -- mouse and keyboard sharing utility
3 * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
4 * SPDX-FileCopyrightText: (C) 2004 Chris Schoeneman
5 * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6 */
7
8#pragma once
9
10#include "io/IStream.h"
11#include "net/ISocket.h"
12
13#include <string>
14
16
21{
22public:
24 {
25 public:
26 explicit ConnectionFailedInfo(const char *what) : m_what(what)
27 {
28 // do nothing
29 }
30 std::string m_what;
31 };
32
33 explicit IDataSocket(const IEventQueue *events [[maybe_unused]])
34 {
35 // do nothing
36 }
37
39
40
42
48 virtual void connect(const NetworkAddress &) = 0;
49
51
52 // ISocket overrides
53 void close() override;
54 void *getEventTarget() const override;
55
56 virtual bool isFatal() const = 0;
57};
ConnectionFailedInfo(const char *what)
Definition IDataSocket.h:26
std::string m_what
Definition IDataSocket.h:30
virtual void connect(const NetworkAddress &)=0
Connect socket.
void close() override
Close socket.
Definition IDataSocket.cpp:16
virtual bool isFatal() const =0
IDataSocket(const IEventQueue *events)
Definition IDataSocket.h:33
void * getEventTarget() const override
Get event target.
Definition IDataSocket.cpp:22
Event queue interface.
Definition IEventQueue.h:29
Generic socket interface.
Definition ISocket.h:19
Network address type.
Definition NetworkAddress.h:17
Bidirectional stream interface.
Definition IStream.h:22