1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| void envoyer(CClient online, char* Msg)
{
msg=Msg;
control = send(online.SocketClient, msg+1, 5, 0);
if (control != 5)
cout<<"erreur: pb dans l'envoy du msg"<<endl;
cout<<"J'ai envoyé "<<msg<<" de taille "<<control<<endl;
}
///////////////////////////////////////////////////////////////////////////////////
void recevoir(CServeur online)
{
memset(msg,'\0',55);
control = recv(online.SocketClient, msg, 5, 0);
if (control != 5)
cout<<"erreur: pb dans la reception du msg"<<endl;
cout<<"Message recu: "<<msg<<" de taille "<<control<<endl;
} |
Partager