deskflow/src/lib/net/ISocketFactory.h

35 lines
848 B
C
Raw Normal View History

2012-06-10 16:50:54 +00:00
/*
* Deskflow -- mouse and keyboard sharing utility
* SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd.
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
2012-06-10 16:50:54 +00:00
*/
#pragma once
2012-06-10 16:50:54 +00:00
2018-03-20 13:53:38 +00:00
#include "arch/IArchNetwork.h"
#include "common/IInterface.h"
2012-06-10 16:50:54 +00:00
class IDataSocket;
class IListenSocket;
//! Socket factory
/*!
This interface defines the methods common to all factories used to
create sockets.
*/
class ISocketFactory : public IInterface
{
2012-06-10 16:50:54 +00:00
public:
//! @name accessors
//@{
2012-06-10 16:50:54 +00:00
//! Create data socket
virtual IDataSocket *create(bool secure, IArchNetwork::EAddressFamily family = IArchNetwork::kINET) const = 0;
2012-06-10 16:50:54 +00:00
//! Create listen socket
virtual IListenSocket *createListen(bool secure, IArchNetwork::EAddressFamily family = IArchNetwork::kINET) const = 0;
2012-06-10 16:50:54 +00:00
//@}
2012-06-10 16:50:54 +00:00
};