GithubHelp home page GithubHelp logo

sfnul's People

Contributors

binary1248 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfnul's Issues

Switch away from tropicssl

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.

Idea: could ´std::tuple´ and ´std::bitset´ be used for more efficient synchronizable data storage?

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?

Update 3rd-party libraries

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?

No byte-swap in member of struct

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.