diff --git a/connection/ipsocket.h b/connection/ipsocket.h index 6bc7a6e..a15182d 100644 --- a/connection/ipsocket.h +++ b/connection/ipsocket.h @@ -1,65 +1,63 @@ /* Copyright (C) 2015 Andreas Hartmetz This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LGPL. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Alternatively, this file is available under the Mozilla Public License Version 1.1. You may obtain a copy of the License at http://www.mozilla.org/MPL/ */ #ifndef IPSOCKET_H #define IPSOCKET_H #include "iconnection.h" #include -class IConnectionListener; class ConnectAddress; class IpSocket : public IConnection { public: // Connect to local socket at socketFilePath IpSocket(const ConnectAddress &ca); // Use an already open file descriptor IpSocket(FileDescriptor fd); ~IpSocket(); // pure virtuals from IConnection uint32 write(chunk data) override; uint32 availableBytesForReading() override; chunk read(byte *buffer, uint32 maxSize) override; void close() override; bool isOpen() override; FileDescriptor fileDescriptor() const override; void handleCanRead() override; // end IConnection IpSocket() = delete; IpSocket(const IpSocket &) = delete; IpSocket &operator=(const IpSocket &) = delete; private: friend class IEventLoop; - friend class IConnectionListener; FileDescriptor m_fd; }; #endif // IPSOCKET_H diff --git a/connection/localsocket.h b/connection/localsocket.h index bdf59a6..be4d822 100644 --- a/connection/localsocket.h +++ b/connection/localsocket.h @@ -1,66 +1,63 @@ /* Copyright (C) 2013 Andreas Hartmetz This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LGPL. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Alternatively, this file is available under the Mozilla Public License Version 1.1. You may obtain a copy of the License at http://www.mozilla.org/MPL/ */ #ifndef LOCALSOCKET_H #define LOCALSOCKET_H #include "iconnection.h" #include -class IConnectionListener; - class LocalSocket : public IConnection { public: // Connect to local socket at socketFilePath LocalSocket(const std::string &socketFilePath); // Use an already open file descriptor LocalSocket(int fd); ~LocalSocket(); // virtuals from IConnection uint32 write(chunk data) override; uint32 writeWithFileDescriptors(chunk data, const std::vector &fileDescriptors) override; uint32 availableBytesForReading() override; chunk read(byte *buffer, uint32 maxSize) override; chunk readWithFileDescriptors(byte *buffer, uint32 maxSize, std::vector *fileDescriptors) override; void close() override; bool isOpen() override; FileDescriptor fileDescriptor() const override; void handleCanRead() override; // end IConnection LocalSocket() = delete; LocalSocket(const LocalSocket &) = delete; LocalSocket &operator=(const LocalSocket &) = delete; private: friend class IEventLoop; - friend class IConnectionListener; int m_fd; }; #endif // LOCALSOCKET_H