Socket C++ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 3

Socket C++

I want to write game with lan multiplayer. I use bsd-socket for chat, but I don't know how to pass player class through socket.

13th Dec 2017, 12:10 AM
Š¢ŠøŠ¼Š¾Ń„ŠµŠ¹ Š”Š¾Š»Š¾Š½Ń‡ŃƒŠŗ
Š¢ŠøŠ¼Š¾Ń„ŠµŠ¹ Š”Š¾Š»Š¾Š½Ń‡ŃƒŠŗ - avatar
1 Resposta
+ 3
There are many ways, i gonna mention two. 1-easy) put your relevant object information into a bytearray and just send it like you did with the text messages. 2-elegant) pass a reference of your object to send and use sizeof(...) for your length. Take a look into boost alignment stuff if you are interested in this way.
13th Dec 2017, 1:09 AM
---
--- - avatar