Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
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 Synergy App 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
20
class
IDataSocket
:
public
ISocket
,
public
deskflow::IStream
21
{
22
public
:
23
class
ConnectionFailedInfo
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
([[maybe_unused]]
const
IEventQueue
*events)
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
};
ISocket.h
IStream.h
IDataSocket::ConnectionFailedInfo::ConnectionFailedInfo
ConnectionFailedInfo(const char *what)
Definition
IDataSocket.h:26
IDataSocket::ConnectionFailedInfo::m_what
std::string m_what
Definition
IDataSocket.h:30
IDataSocket::connect
virtual void connect(const NetworkAddress &)=0
Connect socket.
IDataSocket::close
void close() override
Close socket.
Definition
IDataSocket.cpp:16
IDataSocket::isFatal
virtual bool isFatal() const =0
IDataSocket::IDataSocket
IDataSocket(const IEventQueue *events)
Definition
IDataSocket.h:33
IDataSocket::getEventTarget
void * getEventTarget() const override
Get event target.
Definition
IDataSocket.cpp:22
IEventQueue
Event queue interface.
Definition
IEventQueue.h:29
ISocket
Generic socket interface.
Definition
ISocket.h:19
NetworkAddress
Network address type.
Definition
NetworkAddress.h:17
deskflow::IStream
Bidirectional stream interface.
Definition
IStream.h:22
src
lib
net
IDataSocket.h
Generated by
1.18.0