mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibCore: Remove CSocket's bind() and listen().
We're going to be using dedicated server socket classes instead. This was only implemented for CLocalSocket, and clients have been switched over to using CLocalServer.
This commit is contained in:
parent
fe45f5a6d2
commit
e7957db173
Notes:
sideshowbarker
2024-07-19 13:02:04 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e7957db1738
6 changed files with 0 additions and 28 deletions
|
@ -26,11 +26,3 @@ CLocalSocket::CLocalSocket(CObject* parent)
|
|||
CLocalSocket::~CLocalSocket()
|
||||
{
|
||||
}
|
||||
|
||||
bool CLocalSocket::bind(const CSocketAddress& address)
|
||||
{
|
||||
auto un = address.to_sockaddr_un();
|
||||
int rc = ::bind(fd(), (const sockaddr*)&un, sizeof(un));
|
||||
set_error(errno);
|
||||
return rc == 0;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,4 @@ public:
|
|||
explicit CLocalSocket(CObject* parent = nullptr);
|
||||
CLocalSocket(Badge<CLocalServer>, int fd, CObject* parent = nullptr);
|
||||
virtual ~CLocalSocket() override;
|
||||
|
||||
virtual bool bind(const CSocketAddress&) override;
|
||||
};
|
||||
|
|
|
@ -131,13 +131,6 @@ bool CSocket::send(const ByteBuffer& data)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool CSocket::listen()
|
||||
{
|
||||
int rc = ::listen(fd(), 5);
|
||||
set_error(errno);
|
||||
return rc == 0;
|
||||
}
|
||||
|
||||
void CSocket::did_update_fd(int fd)
|
||||
{
|
||||
if (fd < 0) {
|
||||
|
|
|
@ -22,10 +22,6 @@ public:
|
|||
bool connect(const CSocketAddress&, int port);
|
||||
bool connect(const CSocketAddress&);
|
||||
|
||||
virtual bool bind(const CSocketAddress&) = 0;
|
||||
|
||||
bool listen();
|
||||
|
||||
ByteBuffer receive(int max_size);
|
||||
bool send(const ByteBuffer&);
|
||||
|
||||
|
|
|
@ -17,8 +17,3 @@ CTCPSocket::CTCPSocket(CObject* parent)
|
|||
CTCPSocket::~CTCPSocket()
|
||||
{
|
||||
}
|
||||
|
||||
bool CTCPSocket::bind(const CSocketAddress&)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,4 @@ class CTCPSocket final : public CSocket {
|
|||
public:
|
||||
explicit CTCPSocket(CObject* parent = nullptr);
|
||||
virtual ~CTCPSocket() override;
|
||||
|
||||
virtual bool bind(const CSocketAddress&) override;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue