wood_brian

Members
  • Content count

    374
  • Joined

  • Last visited

Community Reputation

193 Neutral

About wood_brian

  • Rank
    Member
  1. How to start Network Programming?

    I have some examples on my website.  There's also an archive that you can download on the getting started page.  The code in the archive demonstrates sending binary messages between different programs.
  2. High CPU usage in basic C++ program

      I switched from using select to poll in a couple of programs a few months ago.  The interface of poll is easier to work with.
  3. Version of Visual Studio to use

    [quote name='incertia' timestamp='1352777750' post='5000445'] If you have an older version of VS11, all you need to do is update it. Just download the updated compiler and install it. [/quote] I installed the new version: Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 How do you tell if this is a pre-release version or not?
  4. Version of Visual Studio to use

    [quote name='Martins Mozeiko' timestamp='1352682696' post='5000073'] The first link is for updated VS2012 C++ compiler. It was released after VS2012. Read about it here: [url="http://blogs.msdn.com/b/vcblog/archive/2012/11/02/visual-c-c-11-and-the-future-of-c.aspx"]http://blogs.msdn.co...uture-of-c.aspx[/url] The second link is for normal VS2012. [/quote] I'm thinking about using the "normal" version. I have an older version of VS11 already. Would it be good to remove the older version before downloading and installing the newer version?
  5. I'm trying to figure out what version of Visual Studio to use for updating some marshalling benchmarks. In the past I posted about a build problem while building a Boost test and someone pointed out that the version of the compiler I was using is a pre-release version -- Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50214.1. This version sounds like a pre-release version also: http://www.microsoft.com/en-us/download/details.aspx?id=35515 I'm not sure if the VS 2012 version here http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop is a pre-release version or not. Is there a way to tell? Tia.
  6. [quote name='hplus0603' timestamp='1352567020' post='4999668'] Java doesn't have to be so bad. Consider that Minecraft is written in Java. As is many large enterprise web applications, such as online banking etc. And if it makes you happy, Java is less resource hogging than Ruby (used by Twitter) or PHP (used by Facebook) or Python (used by Google) :-) [/quote] Facebook was heavy on PHP, but then they decided to start using C++ more. I don't have Android experience, but I've heard C++ is an option there.
  7. I would recommend using a more specific type than int in your marshalling code. The meaning of int can change between platforms. This line: ZeroMemory(&inStream, sizeof(inStream)); looks questionable. I didn't see the definition of that function, but maybe you don't need to call that function. If you are interested in switching to binary serialization, I could be of more help.
  8. Serialization

    The [url="http://webEbenezer.net"]C++ Middleware Writer[/url] serializes objects so they can be sent across a network. There are links to examples on the home page.
  9. C++ compile times

    [quote name='Telastyn' timestamp='1344450666' post='4967476'] While that would be nifty, one of two things needs to happen if module support is added:[list=1] [*][b]Legacy compilation is supported. [/b]Then you're still in largely the same boat. The compiler can't make shortcuts because it needs to deal with the legacy gotchas that make it horrible today. [*][b]Legacy compilation is not supported. [/b]Then the expansive pile of existing code that is one of C++'s few strengths is useless. Then you get to wait N years for all of the library writers to modularize their code. [/list] And that's [i]after[/i] all of the spec writers settle on a good way to bolt modules onto the language (while still supporting template behaviors? good luck), and after all of the compiler writers actually implement the behavior in something vaguely resembling a standard way. [/quote] I believe they've decided on the first option in terms of supporting legacy compilation. The legacy issue is difficult, but not sure there's a better way. There could be an option in the compiler if you're working on a newer project to provide the faster build times.
  10. dynamic array through sockets

    [quote name='rip-off' timestamp='1344296002' post='4966852'] What you read on "some random forums" was probably referring to generalised and/or automatic serialisation. Such tools may not designed for space optimisation. For example, they may not allow you to express domain specific knowledge such as the range of a "health" variable, etc. [/quote] All the serialization libraries I know of eliminate padding that compilers have added. They also allow marshalling of single bytes. They may not support bit level access though. I'm not aware of a library that supports that.
  11. C++ compile times

    [quote name='frob' timestamp='1344444404' post='4967434'] Many books have been written about improving C++ build times. Exactly which of the thousands of slow patterns your code uses is something we cannot tell. Many powerful and useful design patterns have slow compile times in C++ compilers. C++ compile times are slow. It will always be slow due to the design of the language. [/quote] I'm not sure why you say that. There's work to add support for modules to C++ [url="http://www.youtube.com/watch?v=8SOCYQ033K8"]http://www.youtube.com/watch?v=8SOCYQ033K8[/url]
  12. dynamic array through sockets

    [quote name='Demx' timestamp='1343948665' post='4965668'] is boost a good library for this ? [/quote] There are a lot of good libraries in Boost. The serialization library in Boost has [url="http://webEbenezer.net/comparison.html"]some weaknesses[/url] though. [quote] btw currently i'm using a static array to send the players data from server to clients: [code] struct data { Player array[50]; } [/code] But this will send an array with 50 elements even if less people are logged in the game. That's why i want to try and put a dynamic array, but i read that serialization greatly increases the size of the struct so at the end is it worth it ? [/quote] Where did you read that?
  13. dynamic array through sockets

    [quote name='Demx' timestamp='1343934514' post='4965623'] ok so is there any way to send a dynamic array in the struct i'm sending ? [/quote] Yes, use a [url="http://en.wikipedia.org/wiki/Serialization#C_and_C.2B.2B"]serialization library[/url] .
  14. dynamic array through sockets

    Depending on how Player is defined that may not work. It would probably be better to use a marshalling/serialization library.