?
Solved

Doing mean things to the XMLSocket object.

Posted on 2005-03-21
5
Medium Priority
?
343 Views
Last Modified: 2008-01-09
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
Comment
Question by:Cajones
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 11

Expert Comment

by:Buffon
ID: 13609708
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
 
LVL 1

Author Comment

by:Cajones
ID: 13614445
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
 
LVL 11

Accepted Solution

by:
Buffon earned 1000 total points
ID: 13615129
you can try to construct the string with unicode chars:
"\u0000\u0005......"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question