Skip to content
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

Net Util: Perhaps allow parenting remotes to namespaces #115

Open
CluelessD3v opened this issue Oct 10, 2022 · 0 comments
Open

Net Util: Perhaps allow parenting remotes to namespaces #115

CluelessD3v opened this issue Oct 10, 2022 · 0 comments

Comments

@CluelessD3v
Copy link

Currently Net RemoteEvent and RemoteFunction methods parent the created instances to the Net module, that's fine. But I found my self having a bunch of modules with identical function names, which is convenient for prototypes and non-professional dev projects (like the one I'm hired to develop).

-- Server
local remoteEvent = Net:RemoteEvent("PointsChanged", Namespace)


-- Client
Net:Connect("PointsChanged", Namespace, function(points)
	print("Points", points)
end)

if no namespace is provided when creating the remote it will just default to the current behavior, parenting to the Net module.

and when calling Connect/Invoke it would search in the provided namespace, if it's not provided then it'' either just do a shallow search within the module (or make it recursive search? Not sure how good that idea is)

Not exactly sure if this is a "good idea" but I found it rather useful for my current situation. Thanks a lot for the module! COMM was just overkill for my use case so this is very appreciated ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant