binary1248 / sfnul Goto Github PK
View Code? Open in Web Editor NEWSimple and Fast Network Utility Library
License: Mozilla Public License 2.0
Simple and Fast Network Utility Library
License: Mozilla Public License 2.0
It would appear that tropicssl is not really maintained. Last commit was apparently 2011 and it would seem critical to a security library to see it maintained. I suggest using openssl instead as it is maintained and most users will already have it installed anyway.
I'm a big fan of how easy to use your library is and wanted to share some thoughts about possible optimizations.
Instead of binding synchronizable fields at runtime, would it be possible to generate them at compile time using ´std::tuple´ and C++11 variadic templates?
I was thinking about something like this:
class Player : public SerializableObject<
int, // x
int, // y
float, // health
std::string // name
>
{
...
}
// The above struct would generate something like:
class Player
{
std::bitset<4> dirtyFlags;
std::tuple<int, int, float, std::string> fields;
template<int I> void setAt(const typeAt<I>& x)
{
std::get<I>(fields) = x;
dirtyFlags[I] = true;
}
...
}
Generating the data structure wouldn't be too difficult. Do you, however, think that serializing and synchronizing structures generated that way would be possible?
Currently the SFNUL is a not the best choice to pick, as the dependencies haven't been updated in a long time. Maybe it would be possible to get ASIO and http-parser to a more recent version, but the customization done to Botan seems hard to understand and reapply for newer versions.
Since Botan provides the secure TLS layer, it's critical that it's updated to the latest version to ensure that newly surfaced security issues have been fixed.
Would be great if you could put in some effort to get it update. Maybe Botan cloud also be evaluated for SFML?
Considering the following situation:
server.cpp :
struct A
{
int a;
};
int main()
{
...
//connect, etc
A a1;
a1.a=42;
int i1=42;
sfn::Message msg1;
msg1<<a1<<i1;
//send msg1
...
client.cpp :
struct A
{
int a;
};
int main()
{
//connect, etc.
sfn::Message msg1;
A a2;
int i2;
//recieve msg1,
msg1>>a2>>i2;
std::cout<<a2.a<<std::endl;
std::cout<<i2<<std::endl;
...
correct me if i misunderstood something, but
wouldn't a2.a and i2 be different if the server's and the client's byte order are
different?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.