I want to attempt to write a peer to peer chat client that I can use with one of my friends, both of us are running fedora 17. After doing some reading I want to achieve this by sending the messages through TCP sockets, but I’m not sure what library/libraries I need to use to do this. Honestly I’m a little worn out from trying to get the boost libraries to compile and figuring out how to link them, the whole process just seems unnecessarily complicated to me, seeing that I use vim because I personal prefer not to use IDEs. Are there any standard C++ libraries that allow for packets of data to be sent from one device to another using tcp sockets?
Share
You don’t need any special libraries, it’s all included in the standard C library (libc) that all applications are linked with.
The things you have to do are the usual for a client:
getaddrinfo)socket)connect)writeandread)close)There are many tutorials on network programming on the Internet, almost all of them have examples showing char servers and clients.