dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
797 stars 195 forks source link

Ported the C library to a game framework. (Not an issue; just a shoutout) #85

Closed bedwardly-down closed 1 year ago

bedwardly-down commented 1 year ago

It currently only works for Windows and Linux but getting it done wasn't as difficult as I had expected. The C++ parts were not usable for their plugin system, so I omitted them entirely. The license is left the same with only the appropriate information added.

Framework: Dragonruby

Repo: https://github.com/bedwardly-down/dragonruby-cext-libsocket

bedwardly-down commented 1 year ago

Update: I’ve got it working successfully on Windows, Mac and Linux. I’m working on rebuilding chunks of my implementation to work better with the framework. A member of the community helped setup a build and testing solution and my next milestone after getting the core parts rebuilt and working as needed

dermesser commented 1 year ago

Hey, that's great to hear! Thank you for the notice, it's great to see the code reused elsewhere. Looking at the code though it looks like you did most of the work anyway? :)

bedwardly-down commented 1 year ago

i did copy over some of it directly (including notes you made) but just currently finish rewriting and restructuring it with a slight bit of an API on top of it. Your notes and general structure of the code were so welcomed.

I took a look at the official alternative that could have been used with some major hacking (mruby-sockets gem) and was surprised that many of my direct changes to get it ported over were pretty comparable. I could have actually used the mruby API that the bindings and core framework used for building extensions in C but didn't know that was a thing and built quite a few mechanisms in by hand.

I plan to take this experience and possibly build the first commercial networking middleware solution for the framework. I won't be using my libsocket codebase for that endeavor for security purposes, especially if I need to access DragonRuby's API and underlying proprietary code to make sure anything I do doesn't disrupt the functionality of it while also hopefully hooking into some of its endpoints for things like the internal clock and rendering stack.