• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

Doing mean things to the XMLSocket object.

Ok, so i've got this server application written in java, and i want to make a web based client for it that looks really good, so my obvious choice is to use flash. using the xmlsockets object i am able to receive the data from the java server, unfortunately i dont have any control over the server and it sometimes sends me 0x00 (\0) as a value.. which flash promptly interprets as the terminal string and stops reading from the socket. Is there any way to reassign what value the xmlsocket object uses as its terminal string?
thanks,
caleb
0
Cajones
Asked:
Cajones
  • 2
1 Solution
 
BuffonCommented:
I wrote myself chat in flash with XMLSocket, but fortunatly I wrote the server too :), no you cannot change the value of termination char. May be you tell more info and we can figure out some other way.
0
 
CajonesAuthor Commented:
Heh, actually, it turns out that after playing with the server i only get the null value in the first few bytes of the packet. This is because the message is sent from the java server with the first 2 bytes is a 2byte integer with the size of the message. so sometimes if the message is small enough one of those bytes will be 0x00, this isnt really a problem to detect with flash, but it will be a problem sending back out to the server since the server expects that form.
Do you know if you can send the \0 char back out without flash terminating the message? like can i send '0x00 0x05 bunch of other characters' without flash breaking that message up?
0
 
BuffonCommented:
you can try to construct the string with unicode chars:
"\u0000\u0005......"
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now