Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Binary data reading is invalid #8
Reading binary data has delivered me a lot of strange data. So a looked in the code and saw the following:
binary.AddRange(buffer.Where(b => b != '\0'));`
Binary data can contain also contain a lot of zeros. Ignoring here that goto is also very evil
I have fixed it with copying the amount of data you got from the websocket to a new buffer and than add it to the byte list.
I also added a new log method. Just for performance reasons. I don't like it to generate a string of n byte data just that the log method returns anyway because logging is disabled.