CSpydr icon indicating copy to clipboard operation
CSpydr copied to clipboard

TCP/UDP library bindings?

Open packetmixer opened this issue 2 years ago • 11 comments

it would be fun!

packetmixer avatar Apr 08 '22 14:04 packetmixer

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

Spydr06 avatar Apr 09 '22 18:04 Spydr06

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

packetmixer avatar Apr 10 '22 09:04 packetmixer

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...

Spydr06 avatar Apr 10 '22 10:04 Spydr06

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

packetmixer avatar Apr 10 '22 13:04 packetmixer

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 avatar Apr 10 '22 13:04 Spydr06

So, how‘s it going? Any news?

Spydr06 avatar May 05 '22 14:05 Spydr06

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

Spydr06 avatar May 17 '22 08:05 Spydr06

hey Spydr, i have started working on them at here

packetmixer avatar Jul 18 '22 16:07 packetmixer

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

packetmixer avatar Jul 18 '22 16:07 packetmixer

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

Spydr06 avatar Jul 18 '22 16:07 Spydr06

ah, yeah; the test will be updated soon!

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

packetmixer avatar Jul 18 '22 16:07 packetmixer