Initial commit

This commit is contained in:
alexpete
2021-03-05 11:26:34 -08:00
commit a10351f38d
27091 changed files with 5521199 additions and 0 deletions
@@ -0,0 +1,42 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <android/api-level.h>
#include <arpa/inet.h>
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#define closesocket(_s) close(_s)
#define AZ_EWOULDBLOCK EWOULDBLOCK
#define AZ_EINPROGRESS EINPROGRESS
#define AZ_ECONNREFUSED ECONNREFUSED
#define AZ_EALREADY EALREADY
#define AZ_EISCONN EISCONN
#define AZ_ENETUNREACH ENETUNREACH
#define AZ_ETIMEDOUT ETIMEDOUT
#define SO_NBIO FIONBIO
#define ioctlsocket ioctl
namespace GridMate
{
namespace Platform
{
using SocketType_Platform = int;
}
}
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Carrier/SocketDriver_Android.h>
@@ -0,0 +1,127 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate_Traits_Platform.h>
#include <GridMate/Carrier/Utils.h>
#include <GridMate/Carrier/Driver.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <linux/rtnetlink.h>
#include <arpa/inet.h>
#include <unistd.h>
namespace GridMate
{
string Utils::GetMachineAddress(int familyType)
{
string machineName;
struct RTMRequest
{
nlmsghdr m_msghdr;
ifaddrmsg m_msg;
} rtmRequest;
int sock = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
int family = familyType == Driver::BSD_AF_INET ? AF_INET : AF_INET6;
memset(&rtmRequest, 0, sizeof(rtmRequest));
rtmRequest.m_msghdr.nlmsg_len = NLMSG_LENGTH(sizeof(ifaddrmsg));
rtmRequest.m_msghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_ROOT;
rtmRequest.m_msghdr.nlmsg_type = RTM_GETADDR;
rtmRequest.m_msg.ifa_family = family;
rtattr* rtaAttr = reinterpret_cast<rtattr*>(((char*)&rtmRequest) + NLMSG_ALIGN(rtmRequest.m_msghdr.nlmsg_len));
rtaAttr->rta_len = RTA_LENGTH(familyType == Driver::BSD_AF_INET ? 4 : 16);
int res = send(sock, &rtmRequest, rtmRequest.m_msghdr.nlmsg_len, 0);
if (res < 0)
{
close(sock);
AZ_Warning("GridMate", false, "Failed to send rtm request");
return "";
}
const unsigned int k_bufSize = 4096;
char* buf = static_cast<char*>(azmalloc(k_bufSize, 1, GridMateAllocatorMP));
res = recv(sock, buf, k_bufSize, 0);
if (res > 0 && static_cast<unsigned int>(res) < k_bufSize)
{
for (nlmsghdr* nlmp = reinterpret_cast<nlmsghdr*>(buf); static_cast<unsigned int>(res) > sizeof(*nlmp); )
{
int len = nlmp->nlmsg_len;
int reqLen = len - sizeof(*nlmp);
if (reqLen < 0 || len > res || !NLMSG_OK(nlmp, res))
{
AZ_Warning("GridMate", false, "Failed to dispatch rtnetlink request");
break;
}
ifaddrmsg* rtmp = reinterpret_cast<ifaddrmsg*>(NLMSG_DATA(nlmp));
rtattr* rtatp = reinterpret_cast<rtattr*>(IFA_RTA(rtmp));
char address[INET6_ADDRSTRLEN] = { 0 };
bool isLoopback = false;
string devname;
for (int rtattrlen = IFA_PAYLOAD(nlmp); RTA_OK(rtatp, rtattrlen); rtatp = RTA_NEXT(rtatp, rtattrlen))
{
if (rtatp->rta_type == IFA_ADDRESS)
{
in_addr* addr = reinterpret_cast<in_addr*>(RTA_DATA(rtatp));
inet_ntop(family, addr, address, sizeof(address));
static const in6_addr loopbackAddr6[] = { IN6ADDR_LOOPBACK_INIT };
isLoopback |= family == AF_INET && *reinterpret_cast<AZ::u32*>(addr) == 0x0100007F;
isLoopback |= family == AF_INET6 && !memcmp(addr, loopbackAddr6, sizeof(loopbackAddr6));
}
if (rtatp->rta_type == IFA_LABEL)
{
devname = reinterpret_cast<const char*>RTA_DATA(rtatp);
}
}
if (!isLoopback
&& *address
&& (!strcmp(devname.c_str(), "eth0") || !strcmp(devname.c_str(), "wlan0")))
{
machineName = address;
break;
}
res -= NLMSG_ALIGN(len);
nlmp = reinterpret_cast<nlmsghdr*>(((char*)nlmp + NLMSG_ALIGN(len)));
}
}
azfree(buf, GridMateAllocatorMP, k_bufSize);
close(sock);
return machineName;
}
const char* GridMate::Utils::GetBroadcastAddress(int familyType)
{
if (familyType == Driver::BSD_AF_INET6)
{
return "FF02::1";
}
else if (familyType == Driver::BSD_AF_INET)
{
return "255.255.255.255";
}
else
{
return "";
}
}
}
@@ -0,0 +1,28 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate/String/string.h>
#include <unistd.h>
namespace GridMate
{
namespace Platform
{
void AssignExtendedName(GridMate::string& extendedName)
{
char hostName[64];
gethostname(hostName, AZ_ARRAY_SIZE(hostName));
extendedName = GridMate::string::format("%s", hostName);
}
}
}
@@ -0,0 +1,12 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Session/Session_Android.h>
@@ -0,0 +1,18 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#define AZ_TRAIT_GRIDMATE_ENABLE_OPENSSL 0
#define AZ_TRAIT_GRIDMATE_MAX_PACKET_SEND_SIZE 1400
#define AZ_TRAIT_GRIDMATE_MESSAGE_NO_SIGNAL MSG_NOSIGNAL
#define AZ_TRAIT_GRIDMATE_SECURE_SOCKET_DRIVER_HOOK_ENABLED 0
#define AZ_TRAIT_GRIDMATE_SOCKET_IPV6_SUPPORT_EXTENSION 0
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_Android.h>
@@ -0,0 +1,16 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Platform specific cmake file for configuring target compiler/link properties
# based on the active platform
# NOTE: functions in cmake are global, therefore adding functions to this file
# is being avoided to prevent overriding functions declared in other targets platfrom
# specific cmake files
@@ -0,0 +1,22 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.cpp
GridMate/Carrier/SocketDriver_Platform.h
GridMate/Carrier/SocketDriver_Android.h
GridMate/Carrier/Utils_Android.cpp
GridMate/Session/LANSession_Android.cpp
GridMate/Session/Session_Platform.h
GridMate/Session/Session_Android.h
GridMate_Traits_Platform.h
GridMate_Traits_Android.h
)
@@ -0,0 +1,97 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzCore/std/chrono/types.h>
#include <AzCore/std/containers/array.h>
#include <GridMate/Carrier/SocketDriver.h>
#include <GridMate/Carrier/SocketDriver_Platform.h>
namespace GridMate
{
namespace Platform
{
int Bind(GridMate::SocketDriverCommon::SocketType socket, const sockaddr* addr, size_t addrlen)
{
return ::bind(socket, addr, static_cast<socklen_t>(addrlen));
}
int GetAddressInfo(const char* node, const char* service, const struct addrinfo* hints, struct addrinfo** res)
{
return ::getaddrinfo(node, service, hints, res);
}
void FreeAddressInfo(struct addrinfo* res)
{
::freeaddrinfo(res);
}
bool IsValidSocket(GridMate::SocketDriverCommon::SocketType s)
{
return s >= 0;
}
GridMate::SocketDriverCommon::SocketType GetInvalidSocket()
{
return -1;
}
bool IsSocketError(AZ::s64 result)
{
return result < 0;
}
int GetSocketError()
{
return errno;
}
timeval GetTimeValue(AZStd::chrono::microseconds timeValue)
{
timeval timeOut;
timeOut.tv_sec = static_cast<time_t>(timeValue.count() / 1000000);
timeOut.tv_usec = static_cast<suseconds_t>(timeValue.count() % 1000000);
return timeOut;
}
const char* GetSocketErrorString(int error, SocketErrorBuffer& array)
{
const char* strError = strerror(error);
azsnprintf(array.data(), array.size()-1, "%s", strError);
return array.data();
}
GridMate::Driver::ResultCode SetSocketBlockingMode(GridMate::SocketDriverCommon::SocketType sock, bool blocking)
{
AZ::s64 result = -1;
AZ::s32 flags = ::fcntl(sock, F_GETFL);
flags &= ~O_NONBLOCK;
flags |= (blocking ? 0 : O_NONBLOCK);
result = ::fcntl(sock, F_SETFL, flags);
if (IsSocketError(result))
{
return GridMate::Driver::EC_SOCKET_MAKE_NONBLOCK;
}
return GridMate::Driver::EC_OK;
}
GridMate::Driver::ResultCode SetFastSocketClose(GridMate::SocketDriverCommon::SocketType socket, bool isDatagram)
{
AZ_UNUSED(socket);
AZ_UNUSED(isDatagram);
return GridMate::Driver::EC_OK;
}
void PrepareFamilyType(int ft, bool& isIpv6)
{
isIpv6 = (ft == GridMate::Driver::BSD_AF_INET6);
}
}
}
@@ -0,0 +1,51 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
#define AZ_EWOULDBLOCK EWOULDBLOCK
#define AZ_EINPROGRESS EINPROGRESS
#define AZ_ECONNREFUSED ECONNREFUSED
#define AZ_EALREADY EALREADY
#define AZ_EISCONN EISCONN
#define AZ_ENETUNREACH ENETUNREACH
#define AZ_ETIMEDOUT ETIMEDOUT
#define SO_NBIO FIONBIO
#ifndef closesocket
#define closesocket(_s) close(_s)
#endif
#ifndef ioctlsocket
#define ioctlsocket ioctl
#endif
struct sockaddr_in;
struct sockaddr;
namespace GridMate
{
namespace Platform
{
using SocketType_Platform = int;
}
}
@@ -0,0 +1,79 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate_Traits_Platform.h>
#include <GridMate/Carrier/Utils.h>
#include <GridMate/Carrier/Driver.h>
#include <sys/types.h>
#include <ifaddrs.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
namespace GridMate
{
string Utils::GetMachineAddress(int familyType)
{
string machineName;
struct ifaddrs* ifAddrStruct = nullptr;
struct ifaddrs* ifa = nullptr;
void* tmpAddrPtr = nullptr;
int systemFamilyType = (familyType == Driver::BSD_AF_INET6) ? AF_INET6 : AF_INET;
getifaddrs(&ifAddrStruct);
for (ifa = ifAddrStruct; ifa != nullptr; ifa = ifa->ifa_next)
{
if ((ifa->ifa_addr != nullptr) && (ifa->ifa_addr->sa_family == systemFamilyType))
{
if (systemFamilyType == AF_INET)
{
tmpAddrPtr = &((struct sockaddr_in*)ifa->ifa_addr)->sin_addr;
char addressBuffer[INET_ADDRSTRLEN];
inet_ntop(AF_INET, tmpAddrPtr, addressBuffer, INET_ADDRSTRLEN);
machineName = addressBuffer;
}
else if (systemFamilyType == AF_INET6)
{
tmpAddrPtr = &((struct sockaddr_in6*)ifa->ifa_addr)->sin6_addr;
char addressBuffer[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, tmpAddrPtr, addressBuffer, INET6_ADDRSTRLEN);
machineName = addressBuffer;
}
break;
}
}
if (ifAddrStruct != nullptr)
{
freeifaddrs(ifAddrStruct);
}
return machineName;
}
const char* GridMate::Utils::GetBroadcastAddress(int familyType)
{
if (familyType == Driver::BSD_AF_INET6)
{
return "FF02::1";
}
else if (familyType == Driver::BSD_AF_INET)
{
return "255.255.255.255";
}
else
{
return "";
}
}
} // namespace GridMate
@@ -0,0 +1,128 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <AzCore/std/chrono/types.h>
#include <AzCore/std/containers/array.h>
#include <GridMate/Carrier/SocketDriver.h>
#include <GridMate_Traits_Platform.h>
#include <GridMate/Carrier/Driver.h>
#include <AzCore/std/base.h>
#include <WinSock2.h>
#include <ws2tcpip.h>
#include <Mswsock.h>
namespace GridMate
{
namespace Platform
{
int Bind(GridMate::SocketDriverCommon::SocketType socket, const sockaddr* addr, size_t addrlen)
{
return ::bind(socket, addr, static_cast<socklen_t>(addrlen));
}
int GetAddressInfo(const char* node, const char* service, const struct addrinfo* hints, struct addrinfo** res)
{
return ::getaddrinfo(node, service, hints, res);
}
void FreeAddressInfo(struct addrinfo* res)
{
::freeaddrinfo(res);
}
bool IsValidSocket(GridMate::SocketDriverCommon::SocketType s)
{
return s != INVALID_SOCKET;
}
GridMate::SocketDriverCommon::SocketType GetInvalidSocket()
{
return INVALID_SOCKET;
}
bool IsSocketError(AZ::s64 result)
{
return result == SOCKET_ERROR;
}
int GetSocketError()
{
return WSAGetLastError();
}
timeval GetTimeValue(AZStd::chrono::microseconds timeOut)
{
timeval t;
t.tv_sec = static_cast<long>(timeOut.count() / 1000000);
t.tv_usec = static_cast<long>(timeOut.count() % 1000000);
return t;
}
const char* GetSocketErrorString(int error, SocketErrorBuffer& array)
{
sprintf_s(array.data(), array.size() - 1, "%d", error);
return array.data();
}
GridMate::Driver::ResultCode SetSocketBlockingMode(GridMate::SocketDriverCommon::SocketType sock, bool blocking)
{
AZ::s64 result = SOCKET_ERROR;
u_long val = blocking ? 0 : 1;
result = ioctlsocket(sock, FIONBIO, &val);
if (IsSocketError(result))
{
return GridMate::Driver::EC_SOCKET_MAKE_NONBLOCK;
}
return GridMate::Driver::EC_OK;
}
GridMate::Driver::ResultCode SetFastSocketClose(GridMate::SocketDriverCommon::SocketType socket, bool isDatagram)
{
// faster socket close
linger l;
l.l_onoff = 0;
l.l_linger = 0;
setsockopt(socket, SOL_SOCKET, SO_LINGER, reinterpret_cast<char*>(&l), sizeof(l));
// MS Transport Provider IOCTL to control
// reporting PORT_UNREACHABLE messages
// on UDP sockets via recv/WSARecv/etc.
// Path TRUE in input buffer to enable (default if supported),
// FALSE to disable.
#if !defined(SIO_UDP_CONNRESET)
#define SIO_UDP_CONNRESET _WSAIOW(IOC_VENDOR, 12)
#endif
if (isDatagram)
{
// disable new behavior using
// IOCTL: SIO_UDP_CONNRESET
DWORD dwBytesReturned = 0;
BOOL isReportPortUnreachable = FALSE;
if (WSAIoctl(socket, SIO_UDP_CONNRESET, &isReportPortUnreachable, sizeof(isReportPortUnreachable), NULL, 0, &dwBytesReturned, NULL, NULL) == SOCKET_ERROR)
{
closesocket(socket);
int error = GetSocketError();
(void)error;
AZ_TracePrintf("GridMate", "SocketDriver::Initialize - WSAIoctl failed with code %d\n", error);
return GridMate::Driver::EC_SOCKET_SOCK_OPT;
}
}
return GridMate::Driver::EC_OK;
}
void PrepareFamilyType(int ft, bool& isIpv6)
{
isIpv6 = (ft == GridMate::Driver::BSD_AF_INET6);
}
}
}
@@ -0,0 +1,57 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate_Traits_Platform.h>
#include <GridMate/Carrier/Utils.h>
#include <GridMate/Carrier/Driver.h>
#include <AzCore/PlatformIncl.h>
#include <WinSock2.h>
#include <Ws2tcpip.h>
namespace GridMate
{
string Utils::GetMachineAddress(int familyType)
{
string machineName;
char name[MAX_PATH];
int result = gethostname(name, sizeof(name));
AZ_Error("GridMate", result == 0, "Failed in gethostname with result=%d, WSAGetLastError=%d!", result, WSAGetLastError());
if (result)
{
return "";
}
addrinfo hints = { 0 };
addrinfo* addrInfo;
hints.ai_family = (familyType == Driver::BSD_AF_INET6) ? AF_INET6 : AF_INET;
hints.ai_flags = AI_CANONNAME;
result = getaddrinfo(name, nullptr, &hints, &addrInfo);
AZ_Error("GridMate", result == 0, "Failed in getaddrinfo with %d!", WSAGetLastError());
if (addrInfo->ai_family == AF_INET6)
{
inet_ntop(addrInfo->ai_family, &reinterpret_cast<sockaddr_in6*>(addrInfo->ai_addr)->sin6_addr, name, AZ_ARRAY_SIZE(name));
}
else if (addrInfo->ai_family == AF_INET)
{
inet_ntop(addrInfo->ai_family, &reinterpret_cast<sockaddr_in*>(addrInfo->ai_addr)->sin_addr, name, AZ_ARRAY_SIZE(name));
}
else
{
AZ_Assert(false, "Invalid address family");
}
freeaddrinfo(addrInfo);
machineName = name;
return machineName;
}
}
@@ -0,0 +1,18 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
ly_add_source_properties(
SOURCES
GridMate/Carrier/SecureSocketDriver.cpp
GridMate/Carrier/StreamSecureSocketDriver.cpp
PROPERTY COMPILE_OPTIONS
VALUES -Wno-deprecated-declarations
)
@@ -0,0 +1,11 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
@@ -0,0 +1,15 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include "../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.h"
@@ -0,0 +1,28 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate/String/string.h>
#include <unistd.h>
namespace GridMate
{
namespace Platform
{
void AssignExtendedName(GridMate::string& extendedName)
{
char hostName[64];
gethostname(hostName, AZ_ARRAY_SIZE(hostName));
extendedName = GridMate::string::format("%s", hostName);
}
}
}
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <unistd.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Session/Session_Linux.h>
@@ -0,0 +1,12 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
@@ -0,0 +1,18 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#define AZ_TRAIT_GRIDMATE_ENABLE_OPENSSL 1
#define AZ_TRAIT_GRIDMATE_MAX_PACKET_SEND_SIZE 1400
#define AZ_TRAIT_GRIDMATE_MESSAGE_NO_SIGNAL MSG_NOSIGNAL
#define AZ_TRAIT_GRIDMATE_SECURE_SOCKET_DRIVER_HOOK_ENABLED 1
#define AZ_TRAIT_GRIDMATE_SOCKET_IPV6_SUPPORT_EXTENSION 0
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_Linux.h>
@@ -0,0 +1,16 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Platform specific cmake file for configuring target compiler/link properties
# based on the active platform
# NOTE: functions in cmake are global, therefore adding functions to this file
# is being avoided to prevent overriding functions declared in other targets platfrom
# specific cmake files
@@ -0,0 +1,21 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
../Common/UnixLike/GridMate/Carrier/Utils_UnixLike.cpp
../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.cpp
GridMate/Carrier/SocketDriver_Platform.h
GridMate/Session/LANSession_Linux.cpp
GridMate/Session/Session_Platform.h
GridMate/Session/Session_Linux.h
GridMate_Traits_Platform.h
GridMate_Traits_Linux.h
)
@@ -0,0 +1,15 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include "../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.h"
@@ -0,0 +1,28 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate/String/string.h>
#include <unistd.h>
namespace GridMate
{
namespace Platform
{
void AssignExtendedName(GridMate::string& extendedName)
{
char hostName[64];
gethostname(hostName, AZ_ARRAY_SIZE(hostName));
extendedName = GridMate::string::format("%s", hostName);
}
}
}
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <unistd.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Session/Session_Mac.h>
@@ -0,0 +1,18 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#define AZ_TRAIT_GRIDMATE_ENABLE_OPENSSL 0
#define AZ_TRAIT_GRIDMATE_MAX_PACKET_SEND_SIZE 1400
#define AZ_TRAIT_GRIDMATE_MESSAGE_NO_SIGNAL 0
#define AZ_TRAIT_GRIDMATE_SECURE_SOCKET_DRIVER_HOOK_ENABLED 0
#define AZ_TRAIT_GRIDMATE_SOCKET_IPV6_SUPPORT_EXTENSION 0
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_Mac.h>
@@ -0,0 +1,16 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Platform specific cmake file for configuring target compiler/link properties
# based on the active platform
# NOTE: functions in cmake are global, therefore adding functions to this file
# is being avoided to prevent overriding functions declared in other targets platfrom
# specific cmake files
@@ -0,0 +1,21 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
../Common/UnixLike/GridMate/Carrier/Utils_UnixLike.cpp
../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.cpp
GridMate/Carrier/SocketDriver_Platform.h
GridMate/Session/LANSession_Mac.cpp
GridMate/Session/Session_Platform.h
GridMate/Session/Session_Mac.h
GridMate_Traits_Platform.h
GridMate_Traits_Mac.h
)
@@ -0,0 +1,15 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Carrier/SocketDriver_Windows.h>
@@ -0,0 +1,47 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_Platform.h>
#include <AzCore/std/base.h>
#include <WinSock2.h>
#include <ws2tcpip.h>
#include <Mswsock.h>
#ifdef WSAID_MULTIPLE_RIO
#define AZ_SOCKET_RIO_SUPPORT
#endif
struct sockaddr_in;
struct sockaddr;
struct addrinfo;
AZ_PUSH_DISABLE_WARNING(4800, "-Wunknown-warning-option")
#include <VersionHelpers.h>
AZ_POP_DISABLE_WARNING
#define SO_NBIO FIONBIO
#define AZ_EWOULDBLOCK WSAEWOULDBLOCK
#define AZ_EINPROGRESS WSAEINPROGRESS
#define AZ_ECONNREFUSED WSAECONNREFUSED
#define AZ_EALREADY WSAEALREADY
#define AZ_EISCONN WSAEISCONN
#define AZ_ENETUNREACH WSAENETUNREACH
#define AZ_ETIMEDOUT WSAETIMEDOUT
namespace GridMate
{
namespace Platform
{
using SocketType_Platform = AZStd::size_t;
}
}
@@ -0,0 +1,38 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate_Traits_Platform.h>
#include <GridMate/Carrier/Utils.h>
#include <GridMate/Carrier/Driver.h>
#include <AzCore/PlatformIncl.h>
#include <WinSock2.h>
#include <Ws2tcpip.h>
namespace GridMate
{
const char* GridMate::Utils::GetBroadcastAddress(int familyType)
{
if (familyType == Driver::BSD_AF_INET6)
{
return "FF02::1";
}
else if (familyType == Driver::BSD_AF_INET)
{
return "255.255.255.255";
}
else
{
return "";
}
}
}
@@ -0,0 +1,41 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate/String/string.h>
#include <WinSock2.h>
#include <stdlib.h>
namespace GridMate
{
namespace Platform
{
void AssignExtendedName(GridMate::string& extendedName)
{
char hostName[64];
gethostname(hostName, AZ_ARRAY_SIZE(hostName));
char procPath[256];
char procName[256];
DWORD ret = GetModuleFileName(NULL, procPath, 256);
if (ret > 0)
{
::_splitpath_s(procPath, 0, 0, 0, 0, procName, 256, 0, 0);
}
else
{
azsnprintf(procName, AZ_ARRAY_SIZE(procName), "Unknown");
}
extendedName = GridMate::string::format("%s::%s", hostName, procName);
}
}
}
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Session/Session_Windows.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <AzCore/PlatformIncl.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_Windows.h>
@@ -0,0 +1,18 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#define AZ_TRAIT_GRIDMATE_ENABLE_OPENSSL 1
#define AZ_TRAIT_GRIDMATE_MAX_PACKET_SEND_SIZE 1400
#define AZ_TRAIT_GRIDMATE_MESSAGE_NO_SIGNAL 0
#define AZ_TRAIT_GRIDMATE_SECURE_SOCKET_DRIVER_HOOK_ENABLED 1
#define AZ_TRAIT_GRIDMATE_SOCKET_IPV6_SUPPORT_EXTENSION 0
@@ -0,0 +1,21 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# Platform specific cmake file for configuring target compiler/link properties
# based on the active platform
# NOTE: functions in cmake are global, therefore adding functions to this file
# is being avoided to prevent overriding functions declared in other targets platfrom
# specific cmake files
set(LY_BUILD_DEPENDENCIES
PRIVATE
ws2_32
)
@@ -0,0 +1,23 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
../Common/WinAPI/GridMate/Carrier/SocketDriver_WinAPI.cpp
../Common/WinAPI/GridMate/Carrier/Utils_WinAPI.cpp
GridMate/Carrier/SocketDriver_Platform.h
GridMate/Carrier/SocketDriver_Windows.h
GridMate/Carrier/Utils_Windows.cpp
GridMate/Session/LANSession_Windows.cpp
GridMate/Session/Session_Platform.h
GridMate/Session/Session_Windows.h
GridMate_Traits_Platform.h
GridMate_Traits_Windows.h
)
@@ -0,0 +1,15 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include "../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.h"
@@ -0,0 +1,28 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include <GridMate/String/string.h>
#include <unistd.h>
namespace GridMate
{
namespace Platform
{
void AssignExtendedName(GridMate::string& extendedName)
{
char hostName[64];
gethostname(hostName, AZ_ARRAY_SIZE(hostName));
extendedName = GridMate::string::format("%s", hostName);
}
}
}
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate/Session/Session_iOS.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <unistd.h>
@@ -0,0 +1,14 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include <GridMate_Traits_iOS.h>
@@ -0,0 +1,18 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#define AZ_TRAIT_GRIDMATE_ENABLE_OPENSSL 0
#define AZ_TRAIT_GRIDMATE_MAX_PACKET_SEND_SIZE 1400
#define AZ_TRAIT_GRIDMATE_MESSAGE_NO_SIGNAL 0
#define AZ_TRAIT_GRIDMATE_SECURE_SOCKET_DRIVER_HOOK_ENABLED 0
#define AZ_TRAIT_GRIDMATE_SOCKET_IPV6_SUPPORT_EXTENSION 0
@@ -0,0 +1,10 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
@@ -0,0 +1,21 @@
#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(FILES
../Common/UnixLike/GridMate/Carrier/Utils_UnixLike.cpp
../Common/UnixLike/GridMate/Carrier/SocketDriver_UnixLike.cpp
GridMate/Carrier/SocketDriver_Platform.h
GridMate/Session/LANSession_iOS.cpp
GridMate/Session/Session_Platform.h
GridMate/Session/Session_iOS.h
GridMate_Traits_Platform.h
GridMate_Traits_iOS.h
)