Giter VIP home page Giter VIP logo

Comments (4)

Crim avatar Crim commented on May 9, 2024

@AlexKR --^

from kafka-php.

AlexKR avatar AlexKR commented on May 9, 2024

@Crim thanks for issue. looking very strangely, i will try investigate more about it and will commit correct way for error detecting

from kafka-php.

Crim avatar Crim commented on May 9, 2024

For reference this is running on a x64 machine against kafka 0.8.2.1. Also I didn't test the other code path that has the same change, so not sure if that has issues or not.

from kafka-php.

Crim avatar Crim commented on May 9, 2024

So I took a stab at this. Looking at PHP Docs for pack here: http://php.net/manual/en/function.pack.php

We were using 'n' to unpack this which says: unsigned short (always 16 bit, big endian byte order)
It got swapped to 's' which says: signed short (always 16 bit, machine byte order)

I'm guessing that your system @AlexKR is big endian, where as mine is little endian, which is why I assume this works for you, but not me.

I opened this PR which attempts to detect the endianess of the system the code is running on, and flips the endianess after unpacking to match and be consistent on either platform.

We/I should probably write a test or two to cover this before it gets merged in tho.

#37

from kafka-php.

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.