Multiplayer with Winsock

Well, currently I am using a game engine to develop a game. But, because that engine lacks decent multiplayer capabilities, I am developing a plugin for it to support multiplayer with Windows Sockets 2. At the moment, I do not know how to send variables (int, long, etc.) to clients, only strings. Is it even possible to send variables with WinSock


Answer this question

Multiplayer with Winsock

  • Rob McCaughey

    Well its just that the documentation says that the data type that you send is a const char*. That is why I asked.

  • Edwin Jeffcoat

    Why not send these variables as string and then Convert them when they are receaved


  • Ajakati

    Gho5tFac3 wrote:
    Well, currently I am using a game engine to develop a game. But, because that engine lacks decent multiplayer capabilities, I am developing a plugin for it to support multiplayer with Windows Sockets 2. At the moment, I do not know how to send variables (int, long, etc.) to clients, only strings. Is it even possible to send variables with WinSock


    You can send any chunk of data with WinSock - it doesn't know about strings or variables, it only knows about chunks of memory.

    I must admit, though, that the fact you're asking this question suggests you need a much deeper understanding of the language than you currently have - particularly of topics like pointers - before you'll be able to get decent results out of WinSock.


  • Multiplayer with Winsock