Jump to content
  • Advertisement
Sign in to follow this  
lampik

xmlsocket + winsock

This topic is 5025 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!