Skip to content

Commit cd4aca8

Browse files
Merge pull request #1162 from EOS-Contrib/revert-1160-Update-EOS-1.17.1-43712763-9dca
Revert "Update eos 1.17.1 43712763 9dca"
2 parents 00080fe + bed0a24 commit cd4aca8

File tree

1,173 files changed

+55011
-33652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,173 files changed

+55011
-33652
lines changed

Assets/Plugins/Linux/Core/LinuxPlatformSpecifics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public override void LoadDelegatesWithEOSBindingAPI()
6565
{
6666
#if EOS_DYNAMIC_BINDINGS || UNITY_EDITOR
6767
// TODO: This code does not appear to do anything...
68-
const string EOSBinaryName = Epic.OnlineServices.Common.LIBRARY_NAME;
68+
const string EOSBinaryName = Epic.OnlineServices.Config.LibraryName;
6969
var eosLibraryHandle = EOSManager.EOSSingleton.LoadDynamicLibrary(EOSBinaryName);
7070
#endif
7171
}

Assets/Plugins/Windows/Core/WindowsPlatformSpecifics.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public override void LoadDelegatesWithEOSBindingAPI()
9595
{
9696
// In the editor, EOS needs to be dynamically bound.
9797
#if EOS_DYNAMIC_BINDINGS || UNITY_EDITOR
98-
const string EOSBinaryName = Epic.OnlineServices.Common.LIBRARY_NAME;
98+
const string EOSBinaryName = Epic.OnlineServices.Config.LibraryName;
9999
var eosLibraryHandle = EOSManager.EOSSingleton.LoadDynamicLibrary(EOSBinaryName);
100100
Epic.OnlineServices.WindowsBindings.Hook<DLLHandle>(eosLibraryHandle, (DLLHandle handle, string functionName) => {
101101
return handle.LoadFunctionAsIntPtr(functionName);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:2f957da436d0ad17909ae2d192d6ab4b1836ce0c09a165ad234d112474f0e3e1
3-
size 125440
2+
oid sha256:9d8f034fe2e08482bc0a131702fd9a4066337fc5149527c8b1877a870b6ac9a4
3+
size 122880
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:1da114c20fc09c662b54bb089383189f0a94f83bac57e1d13afd11f26f39ee1d
3-
size 636416
2+
oid sha256:71d77cd8cb1d153472ab5d01e9ae62f7415c95c0baa8c4e54cc856fc2842e758
3+
size 604672
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:c3ede5c79d720914671c994d42f50149d701aba4b2c5cf100995d1af7cccb34b
3-
size 110592
2+
oid sha256:cb8494abca7f617353dd1e1f900ead28a1de316dc84779b63bcf74efcd83ef74
3+
size 87040
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:49f41bf1f6308319f8495b1a1be9e2e634ae03e6a7e6367806e42fffab4620b0
3-
size 483328
2+
oid sha256:ac77b32eaebef7dc1c75aa070bc92ca521ede00c70dcf0c6b5262c3430a5d2c7
3+
size 467968

Assets/Scripts/EOSFriendsManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ public void SubscribeToFriendUpdates(EpicAccountId userId)
817817
var addNotifyFriendsUpdateOptions = new AddNotifyFriendsUpdateOptions();
818818
ulong notificationId = FriendsHandle.AddNotifyFriendsUpdate(ref addNotifyFriendsUpdateOptions, null, OnFriendsUpdateCallbackHandler);
819819

820-
if(notificationId == Common.INVALID_NOTIFICATIONID)
820+
if(notificationId == Common.InvalidNotificationid)
821821
{
822822
Debug.LogError("Friends (SubscribeToFriendUpdates): Could not subscribe to friend update notifications.");
823823
}
@@ -830,7 +830,7 @@ public void SubscribeToFriendUpdates(EpicAccountId userId)
830830
var addNotifyOnPresenceChangedOptions = new AddNotifyOnPresenceChangedOptions();
831831
ulong presenceNotificationId = PresenceHandle.AddNotifyOnPresenceChanged(ref addNotifyOnPresenceChangedOptions , null, OnPresenceChangedCallbackHandler);
832832

833-
if(presenceNotificationId == Common.INVALID_NOTIFICATIONID)
833+
if(presenceNotificationId == Common.InvalidNotificationid)
834834
{
835835
Debug.LogError("Friends (SubscribeToFriendUpdates): Could not subscribe to presence changed notifications.");
836836
}

Assets/Scripts/EOSPeer2PeerManager.cs

Lines changed: 4 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,6 @@ public class EOSPeer2PeerManager : IEOSSubManager
8989

9090
public UIPeer2PeerParticleController ParticleController;
9191
public Transform parent;
92-
private enum PeerConnectionAppState
93-
{
94-
NotConnected,
95-
IceConnected,
96-
HandshakePending,
97-
FullyConnected
98-
}
99-
100-
private Dictionary<ProductUserId, PeerConnectionAppState> connectionStates = new();
101-
102-
private string Request = "hreq";
103-
private string Acknowledgement = "hack";
104-
private string Ping = "ping";
10592

10693
#if UNITY_EDITOR
10794
void OnPlayModeChanged(UnityEditor.PlayModeStateChange modeChange)
@@ -139,19 +126,7 @@ public bool GetChatDataCache(out Dictionary<ProductUserId, ChatWithFriendData> C
139126
ChatDataCache = this.ChatDataCache;
140127
return ChatDataCacheDirty;
141128
}
142-
public void Initialize()
143-
{
144-
SubscribeToConnectionRequest();
145-
146-
var options = new AddNotifyPeerConnectionEstablishedOptions
147-
{
148-
LocalUserId = EOSManager.Instance.GetProductUserId()
149-
};
150129

151-
P2PHandle.AddNotifyPeerConnectionEstablished(ref options, null, OnPeerConnectionEstablished);
152-
153-
Debug.Log("EOSPeer2PeerManager initialized: connection listeners registered.");
154-
}
155130
private void RefreshNATType()
156131
{
157132
var options = new QueryNATTypeOptions();
@@ -213,12 +188,6 @@ public void SendMessage(ProductUserId friendId, messageData message)
213188
Debug.LogError("EOS P2PNAT SendMessage: bad input data: account id is wrong.");
214189
return;
215190
}
216-
if (!connectionStates.TryGetValue(friendId, out var state) || state != PeerConnectionAppState.FullyConnected)
217-
{
218-
Debug.LogWarning($"SendMessage: Cannot send to {friendId}, not fully connected (State={state}).");
219-
return;
220-
}
221-
222191
if (message.type == messageType.textMessage)
223192
{
224193
if (string.IsNullOrEmpty(message.textData))
@@ -314,8 +283,6 @@ public void SendMessage(ProductUserId friendId, messageData message)
314283

315284
public ProductUserId HandleReceivedMessages()
316285
{
317-
318-
319286
if (P2PHandle == null)
320287
{
321288
return null;
@@ -363,21 +330,6 @@ public ProductUserId HandleReceivedMessages()
363330
}
364331

365332
string message = System.Text.Encoding.UTF8.GetString(data);
366-
// --- Handshake protocol ---
367-
if (message == Request)
368-
{
369-
SendHandshakeAck(peerId);
370-
connectionStates[peerId] = PeerConnectionAppState.FullyConnected;
371-
Debug.Log($"Received handshake request from {peerId}. Sending ack and setting FullyConnected.");
372-
return null;
373-
}
374-
else if (message == Acknowledgement)
375-
{
376-
connectionStates[peerId] = PeerConnectionAppState.FullyConnected;
377-
Debug.Log($"Received handshake ack from {peerId}. Connection is now FullyConnected.");
378-
return null;
379-
}
380-
// --- End handshake ---
381333

382334
if (message.StartsWith("t"))
383335
{
@@ -419,11 +371,9 @@ public ProductUserId HandleReceivedMessages()
419371

420372
return peerId;
421373
}
422-
else if (message == Ping)
423-
{
424-
Debug.Log($"EOS P2PNAT HandleReceivedMessages: received ping from {peerId}, ignoring.");
425-
return null;
426-
}
374+
375+
376+
427377
else
428378
{
429379
Debug.LogErrorFormat("EOS P2PNAT HandleReceivedMessages: error while reading data, code: {0}", result);
@@ -492,61 +442,11 @@ private void OnIncomingConnectionRequest(ref OnIncomingConnectionRequestInfo dat
492442
};
493443

494444
Result result = P2PHandle.AcceptConnection(ref options);
495-
SendHandshakeRequest(data.RemoteUserId);
496-
if (result != Result.Success)
497-
{
498-
Debug.LogErrorFormat("P2p (OnIncomingConnectionRequest): error while accepting connection, code: {0}", result);
499-
}
500-
}
501-
private void SendHandshakeRequest(ProductUserId remoteUserId)
502-
{
503-
SendRaw(remoteUserId, "hreq");
504-
connectionStates[remoteUserId] = PeerConnectionAppState.HandshakePending;
505-
}
506-
507-
private void SendHandshakeAck(ProductUserId remoteUserId)
508-
{
509-
SendRaw(remoteUserId, "hack");
510-
}
511-
512-
private void SendRaw(ProductUserId remoteUserId, string rawMessage)
513-
{
514-
SocketId socketId = new SocketId() { SocketName = "CHAT" };
515445

516-
SendPacketOptions options = new SendPacketOptions()
517-
{
518-
LocalUserId = EOSManager.Instance.GetProductUserId(),
519-
RemoteUserId = remoteUserId,
520-
SocketId = socketId,
521-
AllowDelayedDelivery = true,
522-
Channel = 0,
523-
Reliability = PacketReliability.ReliableOrdered,
524-
Data = new ArraySegment<byte>(Encoding.UTF8.GetBytes(rawMessage))
525-
};
526-
527-
var result = P2PHandle.SendPacket(ref options);
528446
if (result != Result.Success)
529447
{
530-
Debug.LogError($"SendRaw failed: {result}");
531-
}
532-
}
533-
private void OnPeerConnectionEstablished(ref OnPeerConnectionEstablishedInfo info)
534-
{
535-
Debug.Log($"[P2P] Connection established with {info.RemoteUserId}");
536-
537-
if (!connectionStates.ContainsKey(info.RemoteUserId))
538-
{
539-
connectionStates[info.RemoteUserId] = PeerConnectionAppState.IceConnected;
540-
SendHandshakeRequest(info.RemoteUserId);
541-
connectionStates[info.RemoteUserId] = PeerConnectionAppState.HandshakePending;
448+
Debug.LogErrorFormat("P2p (OnIncomingConnectionRequest): error while accepting connection, code: {0}", result);
542449
}
543450
}
544-
public void SendTrigger(ProductUserId peerId)
545-
{
546-
if (!peerId.IsValid()) return;
547-
string trigger = "ping";
548-
SendRaw(peerId, trigger);
549-
}
550451
}
551-
552452
}

Assets/Scripts/P2PNetcodeSample/Networking/EOSTransportManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ public class EOSTransportManager : IEOSSubManager
5050
/// Maximum packet byte length
5151
/// </summary>
5252
/// <value><c>1170</c> due to DTLS/SCTP/UDP packet overhead.</value>
53-
public const int MaxPacketSize = P2PInterface.MAX_PACKET_SIZE;
53+
public const int MaxPacketSize = P2PInterface.MaxPacketSize;
5454

5555
/// <summary>
5656
/// Maximum concurrent connections with any individual remote peer.
5757
/// </summary>
5858
/// <value><c>32</c></value>
59-
public const int MaxConnections = P2PInterface.MAX_CONNECTIONS;
59+
public const int MaxConnections = P2PInterface.MaxConnections;
6060

6161
// Connection data, socket name must be unique within an individual remote peer.
6262
public class Connection : IEquatable<Connection>

Assets/Scripts/StandardSamples/Services/TitleStorageService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,9 @@ private ReadResult OnFileDataReceived(ref ReadFileDataCallbackInfo data)
199199
{
200200
return ReceiveData(data.Filename, data.DataChunk, data.TotalFileSizeBytes) switch
201201
{
202-
FileTransferResult.FailRequest => ReadResult.RrFailRequest,
203-
FileTransferResult.CancelRequest => ReadResult.RrCancelRequest,
204-
FileTransferResult.ContinueReading => ReadResult.RrContinueReading,
202+
FileTransferResult.FailRequest => ReadResult.RrFailrequest,
203+
FileTransferResult.CancelRequest => ReadResult.RrCancelrequest,
204+
FileTransferResult.ContinueReading => ReadResult.RrContinuereading,
205205
_ => throw new ArgumentOutOfRangeException()
206206
};
207207
}

0 commit comments

Comments
 (0)