okay, I'll try to do that and I'll tell you how it works.
You said there were other flaws in my code though, would you mind pointing me what they are (except the one were I didn't test recv== -1 and raised a perror if it matched) ?
Thanks.