Files
UnrealEngineUWP/Engine/Source/Runtime/Sockets/Private/Linux/SocketSubsystemLinux.h
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

57 lines
1.2 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "BSDSockets/SocketSubsystemBSD.h"
#include "SocketSubsystemPackage.h"
class Error;
class FInternetAddr;
/**
* Android specific socket subsystem implementation
*/
class FSocketSubsystemLinux : public FSocketSubsystemBSD
{
protected:
/** Single instantiation of this subsystem */
static FSocketSubsystemLinux* SocketSingleton;
/** Whether Init() has been called before or not */
bool bTriedToInit;
// @todo linux: (inherited from iOS) This is kind of hacky, since there's no UBT that should set PACKAGE_SCOPE
// PACKAGE_SCOPE:
public:
/**
* Singleton interface for this subsystem
* @return the only instance of this subsystem
*/
static FSocketSubsystemLinux* Create();
/**
* Performs Android specific socket clean up
*/
static void Destroy();
public:
FSocketSubsystemLinux()
: bTriedToInit(false)
{
}
virtual ~FSocketSubsystemLinux()
{
}
// ISocketSubsystem
virtual bool Init(FString& Error) override;
virtual void Shutdown() override;
virtual bool HasNetworkDevice() override;
virtual TSharedRef<FInternetAddr> GetLocalHostAddr(FOutputDevice& Out, bool& bCanBindAll) override;
};