Sign in to follow this  

xmlsocket + winsock

This topic is 4714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

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;
  }
}





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]

Share this post


Link to post
Share on other sites

This topic is 4714 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this