GithubHelp home page GithubHelp logo

Comments (1)

JoshuaGlazer avatar JoshuaGlazer commented on May 10, 2024

Hi Johannes-

Thank you for your kind words and your concern! We actually have errata registered with our publisher but you make a good point that it’s not available to the public! To remedy that, I’ve added the current errata to the repository (which includes a fix for the issue you mention). Thanks again for reading and for taking the time to get in touch!

Cheers!
Josh

On Sep 3, 2016, at 4:25 PM, Johannes [email protected] wrote:

Preface

I am a Computer Science student and have been working my way through your Multiplayer Game Programming book. It is definitely one of the best networking resources I have found so far, especially given how up to date it is. I therefore want to take the time to help you improve it as best as I can.

The book mentions that errata would be posted in this repo, but I don't see any yet so please let me know if there is another location that might contain them so I don't accidentally post known errata.

The Issue

This may be being pedantic, but in the note section on page 73 of the book where you discuss how some platforms add a size variable on sockaddr structs. I think the name of the variable you mention in the provided example is incorrect.

You state "For instance, on Mac OS X, initialize a sockaddr_in named myAddr", which to me reads like we have a variable of type sockaddr_in, as follows:

sockaddr_in myAddr;
You then write that we can set the MacOSX-specific size variable with the line:

myAddr.sa_len = sizeof(sockaddr_in);
However this results in an error, because the name of the size variable would be sin_len if the type is sockaddr_in.

If the type was just sockaddr then the sa_len member variable would be correct. I think for consistency's sake you the type of the struct and the name of its variable should match up.

Proof (Tested with Clang 7.0.2 on Mac OS 10.10.5);
https://cloud.githubusercontent.com/assets/662874/18228102/4fb5e8ca-71f2-11e6-99ba-9a88212754ba.png

You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #10, or mute the thread https://github.com/notifications/unsubscribe-auth/AEYKc3vOeBq_0ntI0hsr8Lco6WTKi-F-ks5qmgH0gaJpZM4J0ay8.

from multiplayerbook.

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.