-
Notifications
You must be signed in to change notification settings - Fork 450
refactor!: remove NetworkChannel and MultiplexTransportAdapter #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
/// <summary> | ||
/// A network transport | ||
/// </summary> | ||
public abstract class NetworkTransport : MonoBehaviour |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are lots of API breaking changes (for good) in this file. in fact, these changes are influencing changes in other places as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you and @andrews-unity are coordinating since he's got his transport refactor coming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, we had a quick chat about this and he'll also review this PR too.
@@ -260,14 +254,14 @@ public void SendToClient(NativeArray<byte> packet, ulong clientId, int index) | |||
} | |||
} | |||
|
|||
public override unsafe void Send(ulong clientId, ArraySegment<byte> data, NetworkChannel networkChannel) | |||
public override unsafe void Send(ulong clientId, ArraySegment<byte> data, NetworkDelivery networkDelivery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in this file are actually just some temporary fixes. I reckon we're going to have a much better UTPTransport
implementation soon :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(for instance, reading/writing channel IDs can go away but I just wanted to leave "proper" UTPTransport
implementation for later, for a separate PR)
{ | ||
var pipelineIndex = 0; | ||
|
||
GetUTPConnectionDetails(clientId, out uint peerId); | ||
|
||
var writer = new DataStreamWriter(data.Count + 1 + 4, Allocator.Temp); | ||
writer.WriteByte((byte)networkChannel); | ||
writer.WriteByte((byte)networkDelivery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, do we actually need to send the network delivery? I was assuming before we sent the channel so that we could on the receiving end route to the right channel, but if we don't do that... (or maybe I don't understand what this is for)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, you're right. we don't need this and channel ID at all. I wanted to keep better UTPTransport implementation for later, see my comments above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @andrews-unity, if you want me to kill this in this PR, I can do that here even before we make UTPTransport great again :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kill it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double Kill it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duh, we have to also delete the reading of it in Execute
and ServerUpdateJob
…rkVariable changable)
com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Transports/MultiplexTransportAdapter.cs
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/NetworkVariable/NetworkVariableBase.cs
Outdated
Show resolved
Hide resolved
com.unity.netcode.gameobjects/Runtime/Messaging/MessageQueue/MessageQueueHistoryFrame.cs
Show resolved
Hide resolved
…nsform * develop: fix: add `link.xml` to prevent IL2CPP stripping `Unity.PerformanceTesting` (#1172) chore: add boilerplate for `ClientNetworkTransform` sample (#1168) chore: remove `ClientNetworkVariable` (#1167) chore: Disable test while we reevaluate the assumption that INetworkM… (#1163) docs: rename Manual.md to Index.md Only track one metric for scene sync and do not report scene name (#1159) test: create job definitions for mobile build and test (#1152) test: make test runner scene ignored by default for BaseMultiInstanceTest (#1154) fix: remove left-over reference to SyncTransform (#1155) chore: remove unused SyncTransform.cs (#1153) chore!: remove NetworkNavMeshAgent (#1150) fix: NetworkObject parenting support in scene transitioning (#1148) chore!: rename Prototyping asmdef to Components (#1145) feat: add bootstrap sample to package (#1140) chore: remove `--yamato` param from `standards.py` (#1144) fix: MTT-504 connection approval messages and comparing networkconfig (#1138) refactor!: remove NetworkChannel and MultiplexTransportAdapter (#1133) # Conflicts: # com.unity.netcode.gameobjects/Components/Interpolator.meta # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs # com.unity.netcode.gameobjects/Components/Interpolator/BufferedLinearInterpolator.cs.meta # testproject/Assets/Prefabs/PlayerCube.prefab
…-Technologies#1133) * cleanup NetworkTransport API * polish NetworkTransport API * port UNetTransport * kill MultiplexTransportAdapter * kill TransportChannel * NetworkVariableChannel -> Delivery * update IInternalMessageHandler interface * kill NetworkChannel around the codebase * fix MessageQueueContainer * update NetworkVariableBase constructor (make NetworkDelivery of NetworkVariable changable) * minor grammar fix * revert to NetworkVariable.Delivery being an internal const * remove channels from UTPTransport * `./standards.py --fix`
FYI @Cosmin-B