I’m trying to set up a simple TCP socket in C++ without using any non-standard libraries.
I want to make a client socket and a server client and pass an integer to the server from the client. Can someone give me a simple example of a server and a client class?
I’m trying to set up a simple TCP socket in C++ without using any
Share
C++ does not come with a “standard library” for sockets but can of course access the standard C library for sockets.
There you go… Now you can read & write to “s” like any other file.
On the server you do it a bit different:
An now you can read/write to “c” like any file. “s” is the listening socket on which you do nothing but
accept().