EnriqCG / rcon-srcds

A zero-dependency Typescript library for the Source/Minecraft RCON Protocol
https://www.npmjs.com/package/rcon-srcds
MIT License
61 stars 20 forks source link

Add proper support for multipacket responses #25

Closed Taraman17 closed 1 year ago

Taraman17 commented 1 year ago

This PR incorporates the suggested hack from https://developer.valvesoftware.com/wiki/Talk:Source_RCON_Protocol#How_to_receive_split_response?

In my local tests it worked well. Pls check.

Taraman17 commented 1 year ago

As of now, the term packet is sent as long, as long packets arrive - you could add a variable to track if it was sent and with that prevent the multiple packets.

JannesV commented 1 year ago

Why is this still open tho? This fix seems to work perfectly!

EnriqCG commented 1 year ago

Why is this still open tho? This fix seems to work perfectly!

Thanks for the bump. For some reason I missed this PR. I will do some testing with some systems that are currently running this library.

Thank you @Taraman17 for the contribution.