A
A
Anton Mikhailov2014-11-26 12:57:13
linux
Anton Mikhailov, 2014-11-26 12:57:13

What do you need to know to write chat in C++?

Hello. I want to write a console chat in C++ for Linux. Later, screw it to the 2D game interface. For creation of game I plan to use (LibSDL).

Please advise what needs to be studied and in what order.
Started reading about Sockets.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey, 2014-11-26
Protko @Fesor

Sockets, TCP, epoll / select (or better wrapper to use) and threads on the client. + you need to develop a simple minimalistic protocol - in the case of a binary protocol - just take the structures used and write them to the stream. In the case of text, you need to figure out in what format to send them, etc.
It is better to take ready implementation whenever possible.

K
Koss1024, 2014-11-26
@Koss1024

For IPC, try something more modern DBus, for example, or from the same boost
C++ 11 threads (Concurrent programming in action C++ book) or boost threads
And how can it be console if the game is graphic?

A
Alexey Cheremisin, 2014-11-26
@leahch

Forget about sockets, use normal message queues like zeromq zeromq.org or rabbitmq www.rabbitmq.com
This is both easier and saves you from unnecessary bicycles and errors.
Just download the library to work in c++

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question