Basically what I want to do is connect to a host, send some data then put all the received data into a buffer and print it out as it comes...
I know how to connect and send data, no problem.
But my problem comes when trying to receive data.
I mean with a command line application, how are you meant to like ..
Let's say I use a loop
Of course..when I do that it prints out like the whole string again and again.Code:while (1) { recv(bla,bla,bla,bla); printf("%s"); } //You get the picture.
What I need is like, ...
A like char[] array, which can be filled up with characters, and like each time a character is retrieved via the socket, like it prints that character out.
I guess basically what I am looking for, is where I can actually account the amount of characters received then end the loop after say 100 characters.
Thank you in advance....