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

TCP/UDP library bindings? #5

Open
voxaloo opened this issue Apr 8, 2022 · 11 comments
Open

TCP/UDP library bindings? #5

voxaloo opened this issue Apr 8, 2022 · 11 comments
Labels
enhancement New feature or request

Comments

@voxaloo
Copy link

voxaloo commented Apr 8, 2022

it would be fun!

@Spydr06
Copy link
Owner

Spydr06 commented Apr 9, 2022

Which library are you thinking of? All the basic networking functions are already implemented via linux syscalls.

@Spydr06 Spydr06 added the enhancement New feature or request label Apr 9, 2022
@voxaloo
Copy link
Author

voxaloo commented Apr 10, 2022

maybe this? https://github.com/starwing/znet

@Spydr06
Copy link
Owner

Spydr06 commented Apr 10, 2022

That would be a way to do it. The only problem is that this library is not installed on linux systems by default (maybe precompile?). I'd rather use the builtin library from glibc/musl, but they use structs with bitfields, which CSpydr doesn't support.
Finally there would be the option to just write it from scratch, which I'll probably do someday, but currently the stdlib is too minimal for something like that...

@voxaloo
Copy link
Author

voxaloo commented Apr 10, 2022

i think i might attempt to use that library in cspydr (i assume i do [link("the compiled library here")] right? )

@Spydr06
Copy link
Owner

Spydr06 commented Apr 10, 2022

yes, exactly. But that could lead to errors when the path is not correct, try using absolute paths or install the libraray in /usr/lib.
I'm really happy to see someone use my language btw! :)
Let me know how it's going

@Spydr06
Copy link
Owner

Spydr06 commented May 5, 2022

So, how‘s it going? Any news?

@Spydr06
Copy link
Owner

Spydr06 commented May 17, 2022

Closing this because of lack of activity. Reopen when any progress is made.

@Spydr06 Spydr06 closed this as completed May 17, 2022
@voxaloo
Copy link
Author

voxaloo commented Jul 18, 2022

hey Spydr, i have started working on them at here

@Spydr06 Spydr06 reopened this Jul 18, 2022
@voxaloo
Copy link
Author

voxaloo commented Jul 18, 2022

the "binding" stuff is in the namespace internal, and the stuff the developer is gonna use is outside it

@Spydr06
Copy link
Owner

Spydr06 commented Jul 18, 2022

That's good, that's also how I do it since CSpydr lacks private functions

@voxaloo
Copy link
Author

voxaloo commented Jul 18, 2022

ah, yeah; the test will be updated soon!

also, i plan on either making a minecraft server (using the tcp stuff) or something else

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

No branches or pull requests

2 participants