You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Also removed some unreferenced functions that adding 'override' revealed PR #1002 -- Thank you, Omar007! [CL 2498415 by Mike Fricker in Main branch]
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "SocketSubsystem.h"
|
|
#include "BSDSockets/SocketSubsystemBSD.h"
|
|
#include "SocketSubsystemPackage.h"
|
|
|
|
/**
|
|
* 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;
|
|
};
|