Original Post
hello, i have problem with receiving data with my flash client from my server written in c++ i know that string which is sended to flash client has to be ended by null character, but it doesn't work for me :( here is my function for sending data via winsock can anybody help me with form of outgoing strings? i am sure that flash client received this string but it doesn't recognize the null character... thx 4 help [Edited by - lampik on January 17, 2005 10:25:36 PM]
int swriteln(int Socket, char *Msg, ...)
{
char WTmp1[1024] = {0};
char WTmp2[1024] = {0};
va_list VList;
FILE *fw;
if (strlen(Msg) < 1024) {
va_start(VList, Msg);
vsprintf(WTmp1, Msg, VList);
va_end(VList);
sprintf(WTmp2, "%s%c", WTmp1, '\0');
int size;
if ((size = send(Socket, WTmp2, strlen(WTmp2), 0)) != 0) return 0;
return 1;
}
}