Giter Club home page Giter Club logo

Comments (2)

cjhanks avatar cjhanks commented on June 28, 2024

For the regular send() function, padding should be removed. As you mentioned it is not quite a good idea to manage the zero's myself since I must while loop on the original data. I would leave it for the sendmsg() function where the intent is to insure datagram packets are of a fixed size, however it might not even be all the particularly useful there.

If it's all the same to you, I might just remove it from everywhere and make sure buffer objects work as expected.

from pyudt.

Nolhian avatar Nolhian commented on June 28, 2024

Well it's up to you, if you really need padding on sendmsg() on the c++ end go for it. But why do you need fixed size ? With sendmsg() the message has boundaries and will always be as a whole either delivered or not so there is no need to loop over a fixed size to receive the message, it will be received as a whole by recvmsg(). And if the user ever wants to send fixed message sizes he can do a python loop to divide them into fixed sizes. But as I said, if for a particular reason you need it, keep it ;)

from pyudt.

Related Issues (8)

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.