8000 SplitSize(maybe not an issue) · Issue #158 · whirvis/JRakNet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SplitSize(maybe not an issue) #158

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

Open
Grass-block opened this issue Jan 20, 2023 · 2 comments
Open

SplitSize(maybe not an issue) #158

Grass-block opened this issue Jan 20, 2023 · 2 comments
Assignees
Labels
Enhancement A desired JRakNet enhancement. Possible bug A JRakNet possible bug that has yet to be confirmed. Question A question. v3.0 proposal A proposal for the thid major version of JRakNet. v3.0 An issue relating to the third version of JRakNet.

Comments

@Grass-block
Copy link

well i dont think this is an issue but i leave it hear,im sry if ditribute u:D
so im trying to send a MASSIVE packet(about 2mb)using jraknet,but it told me split count should smaller than 128.
it seems that raknet protocol does not really limit the split count,so maybe why dont adding an option to user in order to change the value
image
*in RakNetPeer.java

@whirvis
Copy link
Owner
whirvis commented Jan 20, 2023

Heya! You're not bothering me at all. Thank you for opening the issue! I realize this project has become outdated and has various issues, and I regret not being able to resolve them sooner. I plan (but cannot promise) fixing these someday.

As for this issue, my recommendation would be to split your massive packet into smaller packets. You can send all of them with the priority of RELIABLE (or RELIABLE_SEQUENCED), and encode their index so the full message can be reconstructed once the other side has received all of the chunks. I would also encode a one time unique ID along with the index, so you can send multiple of these large packets without worrying of the other side splicing together the wrong chunks.

An easy way to generate a unique ID is via UUID.randomUUID(), which is built into Java. I believe JRakNet's built in Packet class can read and write UUID objects. However, if that is not the case, you can encode it by calling Packet.writeLong(long) for UUID.getMostSignificantBits() and UUID.getLeastSignificantBits(). UUID has a constructor which takes in two longs, that will let you reconstruct it that way.

@whirvis whirvis added Enhancement A desired JRakNet enhancement. Question A question. Possible bug A JRakNet possible bug that has yet to be confirmed. v3.0 proposal A proposal for the thid major version of JRakNet. v3.0 An issue relating to the third version of JRakNet. labels Jan 20, 2023
@whirvis whirvis self-assigned this Jan 20, 2023
@Grass-block
Copy link
Author

thank u for solving this problem,and im looking forward to the future version.
(well this is actually the most friendly network lib that implements UDP in java)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A desired JRakNet enhancement. Possible bug A JRakNet possible bug that has yet to be confirmed. Question A question. v3.0 proposal A proposal for the thid major version of JRakNet. v3.0 An issue relating to the third version of JRakNet.
Projects
None yet
Development

No branches or pull requests

2 participants
0