67 lines
1.7 KiB
C++
67 lines
1.7 KiB
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuNetSocket.Unix.hpp
|
|
Date: 2022-8-26
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::FS
|
|
{
|
|
struct FileHandle;
|
|
}
|
|
|
|
#include "AuNetSocketOverlappedOperation.Unix.hpp"
|
|
#include "AuNetSocket.hpp"
|
|
|
|
namespace Aurora::IO::Net
|
|
{
|
|
struct NetInterface;
|
|
struct NetWorker;
|
|
struct Socket;
|
|
struct SocketConnectOperation;
|
|
|
|
struct Socket : SocketBase
|
|
{
|
|
Socket(struct NetInterface *pInterface,
|
|
struct NetWorker *pWorker,
|
|
const AuSPtr<ISocketDriver> &pSocketDriver,
|
|
AuUInt osHandle);
|
|
|
|
Socket(struct NetInterface *pInterface,
|
|
struct NetWorker *pWorker,
|
|
const AuSPtr<ISocketDriver> &pSocketDriver,
|
|
const NetEndpoint &endpoint);
|
|
|
|
Socket(struct NetInterface *pInterface,
|
|
struct NetWorker *pWorker,
|
|
const AuSPtr<ISocketDriver> &pSocketDriver,
|
|
const NetSocketConnectMany &connectMany);
|
|
|
|
~Socket();
|
|
|
|
virtual void FinishConstructAsync() override;
|
|
|
|
virtual bool PrepareConnectOperations() override;
|
|
|
|
virtual void UpdateNagleAnyThread(bool bDisableNagle) override;
|
|
|
|
virtual bool UpdateLocalEndpoint() override;
|
|
virtual bool UpdateRemoteEndpoint() override;
|
|
|
|
virtual bool TryBindAnyLocal() override;
|
|
|
|
virtual bool ConnectOverlapped() override;
|
|
virtual bool ConnectNonblocking() override;
|
|
virtual bool ConnectBlocking() override;
|
|
|
|
virtual bool MakeNonblocking() override;
|
|
|
|
virtual void Shutdown(bool bNow) override;
|
|
|
|
virtual void CloseSocket() override;
|
|
|
|
bool MakeCloseonexec();
|
|
};
|
|
} |