Content originally posted in LPCWare by cesimkaol on Fri Jun 15 06:29:43 MST 2012
[SIZE=2]
if (send(sock, data, strlen(data), 0) != strlen(data))
{
cout<<"send() sent a different number of bytes than expected"<<endl;
return 0;
}
else
{
cout<<"Data has been sent :)...."<<endl;
}
close(sock);
cout<<"Connection closed..."<<endl;
/////////////////////////////////////////////////////////////////
for example
char *data="hey my name is cesimkaol";
server get every words as a different data.
hey
my
name
is
cesimkaol
it is really annoying ...What should I do?
I want to send it as a whole sentence "hey my name is cesimkaol"
[/SIZE]