2022-08-28 19:02:06 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: AuNetSocket.NT.hpp
|
|
|
|
Date: 2022-8-16
|
|
|
|
Author: Reece
|
|
|
|
***/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::IO::FS
|
|
|
|
{
|
|
|
|
struct FileHandle;
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "AuNetSocketOverlappedOperation.NT.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);
|
|
|
|
|
2023-01-26 21:43:19 +00:00
|
|
|
Socket(struct NetInterface *pInterface,
|
|
|
|
struct NetWorker *pWorker,
|
|
|
|
const AuSPtr<ISocketDriver> &pSocketDriver,
|
|
|
|
const AuPair<NetHostname, AuUInt16> &endpoint,
|
|
|
|
AuNet::ETransportProtocol eProtocol);
|
|
|
|
|
2022-08-28 19:02:06 +00:00
|
|
|
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;
|
|
|
|
|
2022-11-18 04:15:05 +00:00
|
|
|
virtual void Shutdown(bool bNow) override;
|
2022-08-28 19:02:06 +00:00
|
|
|
|
|
|
|
virtual void CloseSocket() override;
|
2023-01-26 21:43:19 +00:00
|
|
|
virtual void RenewSocket() override;
|
2022-08-28 19:02:06 +00:00
|
|
|
};
|
|
|
|
}
|