mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
4298ba25c3
The C_OBJECT macro now also inserts a static construct(...) helper into the class. Now we can make the constructor(s) private and instead call: auto socket = CTCPSocket::construct(arguments); construct() returns an ObjectPtr<T>, which we'll later switch to being a NonnullRefPtr<T>, once everything else in in place for ref-counting.
17 lines
312 B
C++
17 lines
312 B
C++
#pragma once
|
|
|
|
#include <AK/Badge.h>
|
|
#include <LibCore/CSocket.h>
|
|
|
|
class CTCPServer;
|
|
|
|
class CTCPSocket final : public CSocket {
|
|
C_OBJECT(CTCPSocket)
|
|
public:
|
|
virtual ~CTCPSocket() override;
|
|
|
|
private:
|
|
CTCPSocket(int fd, CObject* parent = nullptr);
|
|
explicit CTCPSocket(CObject* parent = nullptr);
|
|
};
|