Code Monkey home page Code Monkey logo

Comments (4)

chronoxor avatar chronoxor commented on May 20, 2024

First of all please check that you call Reset() for each time, you client is connected:

        void OnConnected()
        {
            // Reset FBE protocol buffers
            Reset();
            ....
        }

from fastbinaryencoding.

chronoxor avatar chronoxor commented on May 20, 2024

If you have your own Server & Client implementation, I suggest starting from ProtoServer/ProtoClient examples to get everything works fine and replace TcpServer/TcpSession/TcpClient with your own transport layer.

from fastbinaryencoding.

M0n7y5 avatar M0n7y5 commented on May 20, 2024

If you have your own Server & Client implementation, I suggest starting from ProtoServer/ProtoClient examples to get everything works fine and replace TcpServer/TcpSession/TcpClient with your own transport layer.

That's what i am trying to do. But the documentation here is outdated and the fact that i need to go to completely different repository in order to get proper info about how to use this project is kinda red flag for me...
For transport i am using Asp.Net websockets with custom encryption. I tested it all before i tried to plug in FBE for some actual protocol. It works flawlessly. But now am getting confusing crashes when i am trying to use FBE;

First of all please check that you call Reset() for each time, you client is connected:

        void OnConnected()
        {
            // Reset FBE protocol buffers
            Reset();
            ....
        }

I am already doing that.

Fun fact... Setting this to 0 here makes it work without crash but it is printing this infinitely
obrazek

remedybg_Avwa9Y8MNR

So that means it correctly get message size. But still why is it able to print that message and the after printing its get validated?
Shouldn't be this other way? Invalidate message -> Parse -> Invoke handlers?

from fastbinaryencoding.

M0n7y5 avatar M0n7y5 commented on May 20, 2024

I found the issue... The issue was additional message byte padding created by encryption algorithm. Since FBE tries to parse entire provided buffer. It was parsing first message correctly and then it tried to parse rest of the buffer. Since excess bytes are null, static assert with invalid message size is triggered. I made some additional changes and now it seems to be working fine.
I was under the impression that FBE will ignore those padding bytes which DOES but not in Debug mode.

from fastbinaryencoding.

Related Issues (20)

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.