Skip to content

Comments

Add channel information to peer_packet signal in SceneMultiplayer#116708

Open
SasaSuppenknecht wants to merge 6 commits intogodotengine:masterfrom
SasaSuppenknecht:peer_packet_channel
Open

Add channel information to peer_packet signal in SceneMultiplayer#116708
SasaSuppenknecht wants to merge 6 commits intogodotengine:masterfrom
SasaSuppenknecht:peer_packet_channel

Conversation

@SasaSuppenknecht
Copy link

This PR adds the channel information of a received packet to the peer_packet signal in SceneMultiplayer.

Previously, the signature was:
peer_packet(int id, PackedByteArray data)

And now it is:
peer_packet(int id, PackedByteArray data, int channel)

This PR is based on godotengine/godot-proposals#12907. The proposal suggests including a new signal for backwards compatibility, however, this kind of redundancy does not seem like a good fit for the engine. I also selected the channel information to be the last argument, as to be symmetrical to SceneMultiplayer.send_bytes.

@SasaSuppenknecht SasaSuppenknecht requested a review from a team as a code owner February 24, 2026 08:03
@Nintorch Nintorch added this to the 4.x milestone Feb 24, 2026
@AThousandShips AThousandShips changed the title Add channel information to peer_packet signal in SceneMultiplayer Add channel information to peer_packet signal in SceneMultiplayer Feb 24, 2026
@AThousandShips
Copy link
Member

The proposal suggests including a new signal for backwards compatibility, however, this kind of redundancy does not seem like a good fit for the engine.

The suggestion of a new signal would be the better option as this breaks compatibility in a pretty significant way, as there's no way to automatically adjust to changes to signals, and no editor warning or indication of the change

@SasaSuppenknecht
Copy link
Author

The suggestion of a new signal would be the better option as this breaks compatibility in a pretty significant way, as there's no way to automatically adjust to changes to signals, and no editor warning or indication of the change

Ah, makes sense. Then I will do as suggested in the initial proposal and add a new signal peer_packet_with_channel that contains the channel in its signature.

@SasaSuppenknecht SasaSuppenknecht requested a review from a team as a code owner February 25, 2026 05:48
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants