I am a newbie using C++ and I have a background with Java
I am working on a simple linux server using c++ and I have a question about converting byte data.
In Java, I can use putShort, or putString in ByteBuffer and simply send the buffer over socket using byteBuffer.array()
What is the corresponding c++ code of this?
Thanks in advance.
C++ itself does not have networking builtin. You might want to skim through the boost libraries. Install them, they are common, and read the documentation.