Comments (4)
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.
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.
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
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.
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)
- python uuid default value small bug HOT 3
- libfmt issue for cpp HOT 1
- Generate c++ without exceptions HOT 6
- C# generated code doesn't generate Send Method HOT 5
- Any plans for async support for C#? HOT 4
- Watchdog timeout bug in x86 HOT 3
- Leak if sending data in a loop. HOT 2
- Switch out std::optional with tl::optional HOT 1
- Failed build in Windows using Visual Studio
- Missing documentation for Message HOT 2
- How to install fbec compiler for macos HOT 5
- Go Serialization panics on nested struct field. HOT 2
- Separate build documentation for debian-based linux and RedHat-based linux
- Unable to build with C++ proto models HOT 1
- Array/user-defined class as map value
- Specify language and platform for such a poor protobuf deserialization benchmark
- Add bool return for receive protocol
- "Deleted function" error when building stub consumer of client/server protocols (C++) HOT 1
- Is there a specific reason to undef HOST_NOT_FOUND? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastbinaryencoding.