ByteNet Max | Upgraded networking library w/ buffer serialisation, strict Luau and RemoteFunction support | v0.1.9

When use the struct and how to use the array and map type?

I will look into it soon. Kinda busy atm

It looks a bit daunting to hop over too especially from wally.

I prefer the simplicity of things and having the program diy it for you instead of having to manually input x when only desired inputs (the developers input) are necessary.

Well, this is the fastest and most efficient networking library out there. Optimisation comes with costs.

Is there any videos or any like evidence to support that its actually better or if not the best? Anyone could make the claims. I don’t personally want to learn something that I might not intend on using anyway.

And yes I am aware of costs.

Read the posts above, there’s benchmarking. Further benchmarking here

1 Like

That’s actually pretty fast. I will likely consider this in the future if I need a better alternative for networking.

1 Like

i think you should simplify the api down to bridgenet level also does this library support sending tables?

also would like to see performance

I’ve already provided benchmarks multiple times in this post, please read above.

You cannot, ByteNet requires specific type checking for optimal functionality. It does support sending tables, yes.

Version 0.1.9

Upgrades

  • Queries now yield for responses. Thanks to @oSudden for this fix.

Now available on GitHub, Wally & Creator Store.
@ADRENALXNE, this might resolve your problem, please let me know.

Quick question is there anyway to send callback type functions between the server to the client? My broadcast system sends custom callback functions to handle the clicking of the broadcast its self (as its a gui) and was wondering would I use buffer or some other type to do that?

Remote Events and Callbacks | Documentation - Roblox Creator Hub.

It is impossible to send functions through remote events.

1 Like

I could’ve sworn I had done it before. Might be latenightSyndrome.

1 Like

Do the optional types not work for the queries? I keep getting queryResult hung warnings even despite the server receiving the message and returning the value which is nil sometimes, which should be okay if I’m using the optional type no?

Here’s my code.

		queries = {
			GetInstanceFromUUID = ByteNet.defineQuery({
				request = ByteNet.string,
				response = ByteNet.optional(ByteNet.inst)
			}),
			GetUUIDFromInstance = ByteNet.defineQuery({
				request = ByteNet.inst,
				response = ByteNet.optional(ByteNet.string)
			})
		}
DataCommunication.queries.GetUUIDFromInstance.listen(function(instance : Instance, player : Player)
	print("TESTING?")
	return helper.getUUIDFromInstance(instance)
end)
function helper.getUUIDFromInstance(instance : Instance, resync : boolean) : string?
     --- HANGS right here for ten seconds even despite the server returning nil
	local uuid = (resync and DataCommunication.queries.GetUUIDFromInstance.invoke(instance)) or nil
	if(not uuid) then
		for uuid, _instance in UUIDsToInstances do
			if(_instance == instance) then return uuid end
		end
		uuid = DataCommunication.queries.GetUUIDFromInstance.invoke(instance)
	end
	if(uuid) then
		UUIDsToInstances[uuid] = instance
	end
	return uuid
end

I think it waits for 10 seconds because the result is nil, since it waits till it receives a valid result. Maybe make it return an empty string if nil?

This would be a doable workaround for now, however I have another function that does something similar except it retrieves instances from a UUID, which in this case wouldn’t work with the workaround you have provided if there was a non-existent instance (unless I changed my byte type to be unknown but that would make the networking more inefficient of course). :thinking:

1 Like

A non-existant instance would still return a nil would it not? So before sending it back, you could check for a nil?