Is there a way to flush an XMLSocket?

Flash Media Server 2 provides an XMLSocket class. The
XMLSocket.send() method does not immediately send the data passed
to it. Is there any way to flush an XMLSocket and force it to send
the data that it has?
I have an application that needs to send very small XML
objects to another process. The XML objects need to be sent right
away. The XMLSocket in the Flash Media Server 2 seems to buffer the
data. I have tried both the XMLSocket and the XMLStream classes.
Neither sends the data right away.
Any suggestions?

Also the G1.NomadISP likes to boot weaker connections quite frequently, and often ignore the first internet reuqest.

Similar Messages

  • Is there a way to flush my hard drive of all info but keep the OS?

    Hey Apple Forums, I'm new here so pardon any mistakes that I may make along the way.
    So I've got a very old iMac PowerPC G4 that I've been wanting to get rid of for a while. It's got 384 MB of RAM and a 700Mhz Processor, along with what I believe is a 50Gb Hard Drive (I haven't found a way to check for sure). It's running Mac OS X 10.2.8. So here's my question. Is there a way to totally flush the hard drive (or reformat it) to get rid of any sensitive data, but then be able to install or keep the OS files and get it running again? I'm not sure if it even came with an installation disk, but by now it's long gone. Feel free to ask me any questions if you need to know more or give me any tips or advise.
    Thanks,
    Lopesian

    All Macs are supposed to come with installation discs from Apple, until July 20, 2011.  Sadly finding the original discs for that Mac is going to prove a bit of a chore.  You can do much of what you want by simply creating a new user account through Apple menu -> System Preferences -> Accounts, and deleting the old account.  I do highly recommend backing up your old data elsewhere.   See my backup FAQ*:
    http://www.macmaps.com/backup.html

  • Is there a way to flush out a socket's output stream without...

    ...having to close it (the stream)?
    I'm trying to implement a keep-alive feature in a simple HTTP Server application. This is a draft of the code I have trouble with:
    ==========
    //'clientSocket' is the socket obtained by the 'serverSocket.accept()' method
    OutputStream out = clientSocket.getOutputStream();
    //'message' is a string to be sent to the client
    InputStream data = new ByteArrayInputStream(message.getBytes());
    byte[] buff = new byte[2048];
    while (true)
    int read = data.read(buff, 0, 2048);
    if (read <= 0)
    break;
    out.write(buff, 0, read);
    out.flush();
    ==========
    If I don't call 'out.close()', the data will not be sent to the client.
    If I call 'out.close()', the data will be sent, but the socket will be closed too, which I don't want to. I need to be able to reuse that socket .
    Is there any way to properly push out the data to the client without having to close the output stream?

    ...having to close it (the stream)?Yes. OutputStream.flush(). But if you're not using any kind of buffered writer/output stream you don't even have to do that.
    If I don't call 'out.close()', the data will not be sent to the client.Untrue. The client will read everything that has been written If you don't close the output stream, the client will never get the EOS indication (e.g. read() returning -1). So if your client is looping until that happens it will loop forever ...
    Your problem at the moment is at the reading end.

  • Ok i needed to flush my computer because i had a virus and i had to delete all my music is there a way i can get the library from my ipod onto the new itunes i downloaded because i dont want to have to download all the songs again

    Ok i needed to flush my computer because i had a virus and i had to delete all my music is there a way i can get the library from my ipod onto the new itunes i downloaded because i dont want to have to download all the songs again

    It has always been very basic to always maintain a backup copy of your computer for just such an occasion.
    Use your backup copy to put everything back.
    If for some reason you have failed to maintain a backup copy ( not good), then you can transfer itunes purchases from your ipod.  Without syncing:  File>Transfer Purchases

  • Is there a way to disable program sync calls for filesystem writes?

    First of all I'm only 80% sure I know what I'm talking about with some of these terms regarding how the kernel handles file operations.  If I get something wrong pointing me to documentation to help me understand would be appreciated.
    So I'm setting up Arch on a USB key as sort of a rescue disk/use Linux when I'm not allowed to install install Linux on the computer (like at my inlaw's house) solution.  I'm still early enough in the process that starting over is fine.  I'm going to be using this for a full Arch system, that does things like run pacman updates and a very lightweight Xorg GUI setup.
    Right now I'm going with btrfs, but some other file system that's at least as stable would be fine as well.
    One of the things I'm wanting to have for this is to have as few rewrites to the USB key as possible, while at the same time be workable on computers that have limited RAM.  I'm thinking that if I could tell the kernel to only write to the USB key when it has to, such as running out of memory, unmounting, or shutting down, then that would be one way to accomplish that.  Is there any way to do that?  I would prefer it to be something I can set when I mount a given drive, but if it has to be system wide that would be acceptable as well as long as I could still sometimes run a swap file properly on the computer's hard disk (if I'm in a situation where I am able to do so).  The important thing is that the individual programs don't actually write to the disk when they send a sync call to the kernel, because I'm thinking most programs won't be able to be configured to work the way I want them to directly.
    I understand that this means I would lose everything "written" since the last flush to the drive, but that's fine by me.  Having a way to explicitly have me (as root) say "OK, now flush changes to disk" would be useful as well, but not necessary.

    In iTunes go to Edit > Preferences > Advanced and select the option to prevent automatic syncing of iDevices when plugged in.

  • Is there a way to overload the Map's toString() function?

    Hello everyone. I was wondering if its possible to overload the toString() function of the Map datastructure supplied by java.
    I looked it up and it says:
    public class HashMapextends AbstractMapSo I looked up AbstractMap and it says:
    public abstract class AbstractMapextends Objectimplements MapAnd I found a toString() function in the AbstractMap saying:
    toString
    public String toString() Returns a string representation of this map. The string representation consists of a list of key-value mappings in the order returned by the map's entrySet view's iterator, enclosed in braces ("{}"). Adjacent mappings are separated by the characters ", " (comma and space). Each key-value mapping is rendered as the key followed by an equals sign ("=") followed by the associated value. Keys and values are converted to strings as by String.valueOf(Object). This implementation creates an empty string buffer, appends a left brace, and iterates over the map's entrySet view, appending the string representation of each map.entry in turn. After appending each entry except the last, the string ", " is appended. Finally a right brace is appended. A string is obtained from the stringbuffer, and returned.
    here: http://java.sun.com/j2se/1.3/docs/a...ml#toString()So I did the following:
    package parse;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.io.*;
    //this class should store all the Messages or "Events" and
    //you can access them based on their EntityID key.
    public class MessageDB extends HashMap
         //database to hold the information
         //     holds the Alerts/messages
         public static Map<Integer, List<String>> AlertMap;
         //Constructor
         MessageDB()
              AlertMap = new HashMap<Integer, List<String>>();
         public String toString()
              return ( )//not sure what to put here...
         //print, outputs the contents of the hashMap
         public static void print()
            //want to print out the Key and all the Messages
              //associated with that key
              Set keys = AlertMap.keySet();          // The set of keys in the map.
              Iterator keyIter = keys.iterator();
              System.out.println("The map contains the following associations:");
              while (keyIter.hasNext()) {
                    Object key = keyIter.next();  // Get the next key.
                    Object value = AlertMap.get(key);  // Get the value for that key.
                    System.out.println( "EntityID: " + key + "\n"
                                  + "Message: " + value + "\n" );
         //overloaded print to print to user screen.
         public static void print(PrintWriter out)
              //want to print out the Key and all the Messages
              //associated with that key
              Set keys = AlertMap.keySet();          // The set of keys in the map.
              Iterator keyIter = keys.iterator();
              out.println("The map contains the following associations:");
              out.flush();
              while (keyIter.hasNext()) {
                    Object key = keyIter.next();  // Get the next key.
                    Object value = AlertMap.get(key);  // Get the value for that key.
                   //out.flush();
                   /* out.println( "   (" + key + "," + value + ")" );
                   out.flush();*/
                   // out.println("------------------\n");
                   out.println("EntityID: " + key + "\n"
                                  + "Message: " + value + "\n");
                   //out.println("------------------\n");
                   out.flush();
         void add(Message msg)
              //getting the position of the List by EntityID if avaiable
              List<String> Alert = AlertMap.get(msg.entityID);
              //checking to see if there is a unique Key already in the Map.
              if (Alert == null)
                   //if there isnt a key in the map, add a new key, and a new List mapping
                   //to the key EntityID;
                     Alert = new ArrayList<String>();
                     AlertMap.put(msg.entityID, Alert);
                     Alert.add(msg.message);
              else
              //adding message to List
                   Alert.add(msg.message);
    }Right now the output is like this:
    The map contains the following associations:
    EntityID: 99999
                      Message: [a test ]
    EntityID: 800
                    Message: [this is a test , again a test ]
    EntityID: 801
                    Message: [again a test ]
    EntityID: 111
                    Message: [a test again yes , a test once again ]You see how its automatically doing [message1, message2,...,message x]
    By me calling this line of code:
    out.println("EntityID: " + key + "\n"
                                  + "Message: " + value + "\n");Because I found out it implicity calls the toString() method when concatinating it to a string.
    What I would like it to display would be:
    EntityID: 800
    Message:
    This is a test
    This is a test again
    any ideas would be great!
    Or is there a way to just iterate over the messages, rather than doing it my way?
    Message was edited by:
    lokie

    Hi,
    When you do a String concatenation in java, calls are implicitly done to #toString().
    Means, you are doing this:
    while (keyIter.hasNext()) {
                    Object key = keyIter.next();  /
                    Object value = AlertMap.get(key); 
                    System.out.println( "EntityID: " + key.toString()+ "\n"
                                  + "Message: " + value.toString() + "\n" );
    }The "[ [/b]... [b], ... , ... ]" you can see in your output is created by the implicit call to List#toString() method.
    You can Override it in an anonymous class by doing:
    if (Alert == null)
                   //if there isnt a key in the map, add a new key, and a new List mapping
                   //to the key EntityID;
                     Alert = new ArrayList<String>(){
                              @Override
                               public String toString(){
                                StringBuilder sb = new StringBuilder();
                       for(String s: this){
                        sb.append(s);
                        sb.append("\n");
                               return sb.toString();
                             };PS:
    toString() is usually used for debbuging only...

  • I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    I have always heard that Macs are less likely to get infected with a virus.  My computer has been running much slower since I installed Maverick.  Just not sure what the problem might be.  Is there a way for me to run a diagnosis?

    Some have found relief just by reinstalling, but it is more than likely incompatible third-party applications that slow it down.
    You will have to investigate to see what it is.
    Open Activity Monitor and see if anything is using a lot of CPU% or Memory. If they are, check to see if there is an update for them.
    Another place to look is the Console. See if anything is logging repeating messages with throttling and/or respawn in the All Messages list.
    Sometimes it is not that easy to root out the problems, but if you have anything that purported to clean, protect, optimize, maintain, or flush your system, then that is likely the cause.

  • MG5420 Is There a Way to Sharpen Print-on-Disc Artwork?

    Hello,
    BOTTOM LINE: Can I change the Print Quality setting when printing my artwork on a printable disc?
    I recently changed from an Epson R220 printer to a Canon MG5420. Both allow direct printing onto printable CD and DVD discs. I changed printers because of Epson's tendency for the ink nozzles to dry out, making the printer unusable. Three R220s have died on me that way, in spite of my trying several solvents to flush them out.
    I create the artwork (photos, drawings, text) in Photoshop, save it as a .jpg, and import it into Canon's Disc Label Print software.
    I've noticed that the disc printing I got from the Epson printer was significantly sharper than that I am getting from the Canon printer. I see that in the Canon program you can make facial adjustments (sharpness, etc.). Is there a way also to improve the overall resolution of the printed images? As is, the resulting printing is acceptable, but I know from my experience with Epsons that it could be better.
    Thanks,
    Bill

    Since starting this thread, I've done more exploring and found a partial answer. Don't know if it's the best, but it helps.
    The steps are:
    After the artwork is on the template and before printing,
    Right-click on the image.
    On the drop-down menu, select Correct/Enhance.
    Click on the Manual tab.
    Increase the sharpness on the Sharpness scale. (I tried 10, and it seemed to work well to sharpen the text.)
    It's still not up to the level of the Epson printer I had, but the text is less jagged. Of course, too much sharpness can make other parts of an image--such as people's faces--seem less realistic.
    Next time, I might try a mid-range sharpness to see if that is a good balance.
    Bill

  • When my Gen 6 nano fades to black the unit shuts off completely and the music stops. is there any way to fix this?

    When my Gen 6 nano fades to black the unit shuts off completely and the music stops. Is there any way to fix this?

    Make sure the headphones are plugged ALL the way in, meaning the white part of the headset is flush with the body of the Nano and no silver from the headphone's plug can still be seen.
    You posted this in the iPod Touch forum, when you should have posted this in the iPod Nano forum.
    B-rock

  • Is there any way exsit to drop database specific data buffer from buffer pool.

    hi,
       Is there any way exist to drop one data buffer(DBCC DROPCLEANBUFFERS)
    .like DBCC FLUSHPROCINDB( db_id )
    yours sincerely.

    hi,
       Is there any way exist to drop one data buffer(DBCC DROPCLEANBUFFERS
    You can selectively flush plans from buffer pool, not all cache objects related to database . See
    DBCC FREEPROCCACHE
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Is there a way to open two months at the same time in iCal?

    I have recurring events for every month in 2009 and want to replicate them in 2010. I do not want to just extend the stop date because there will be subtle changes to the 2010 items that I do not want changed in the 2009 versions. I would ideally like to open Jan 2009 and Jan 2010 next to each other and copy the 2009 event to the 2010 calendar (the appointment copy does not copy the recurrence info which is good). Is there a way to show either two instances of iCal running or 2 month windows?
    Thanks!

    Hi,
    If you activate iCal's Debug menu, you should find it has a 'New Calendar Window' option (Cmd-L). It is a bit of a knack to cutting and pasting correctly between windows.
    Best wishes
    John M

  • I create a birthday calendar in iCal and then click on it in iphoto at the begining of the calendar project each year.  Some how the birthday did not populate the photo calendar.  Is there a way to add the birthday iCal calendar into the calendar project?

    I created a birthday calendar to use in iphoto for calendar.  When a new calendar project is started each year, I click on it in.  Some how the birthday did not populate the photo calendar this year.  The photo calendar is almost complete.  Is there a way to add the birthday iCal calendar into the calendar project? I would prefer not to start over.

    Hi,
    If you first select the calendar on the left, so that its background is highlighted blue/grey, when you make a new events they should be added to that calendar.
    Best wishes
    John M

  • Is there a way of getting a "schedule view" in iCal on a mac and on iPad in the same way you can get one on iPhone?

    IS there a way to get a schedule view of events on a busy day in iCal on the iPad 2 Air and on the Macbook Pro?  I can get this view on an iPhone.

    I am paranoid that some untrusted technician is going to make a copy of my music (11,000 tracks) or share some of my personal information (scanned copies of my birth certificate, passport, certificates, photos, etc.) on the web.
    If you put your info into the computer and hand it to another, you have to assume they will copy everything.
    Why are you putting scanned copies of valuable identity information into a computer than can be hacked, stolen, lost or compromised by a dirty tech?
    Have you lost your mind?
    Is there a way of finding out what activity has taken place whilst they've had it in their possession?
    No. The tech would just deny it if he did, or tell the truth which the answer would be "NO" in either case.
    The employer won't ask that sort of questions without solid proof, less they make a enemy of the employee and/or risk being sued for defamation of character.
    It's not like they bother to have a team of people watching over his shoulder that he doesn't stick a USB thumb drive of your data into his pocket to take home.
    I am paranoid that some untrusted technician is going to make a copy of my music (11,000 tracks)
    If it's iTunes music, it has your personal ID embedded into the song files. Most IT techs know this though.
    I appreciate any advice you guys can offer.
    Too late now, all you can do is not worry about it.
    Take your personal info out of the machine and if you need it, burn cd/dvd copies, a few USB thumb drives, Iron Keys or self encrypting external storage drives with key and/or keypad.

  • Is there a way to create a year at a glance with detail and print?

    Is there a way to create a year at a glance with detail and print?

    To do what Dave indicated you need to do, it depends on what version of Acrobat you have:
    Acrobat 8: Advanced > Enable Usage Rights in Adobe Reader
    Acrobat 9: Advanced > Extend Features in Adobe Reader
    Acrobat 10: File > Save As > Reader Extended PDF > Enable Additional Features
    Acrobat 11: File > Save as Other > Reader Extended PDF > Enable More Tools (includes form fill-in & save)
    I wonder what it will be next time?

  • Can I put more than one user under one Apple ID account. I want to let other family members use imessage on their own Apple device. Or is there another way to get this end result?

    Can I put more than one user under one Apple ID account. I want to let other family members use imessage on their own Apple device. Or is there another way to get this end result?

    You can seach the net for solutions like this one http://appletvvpn.com/how-to-connect-apple-tv-2-to-vpn/ another idea is to use a PC as the control and fit that with a wireless card and set up a ad hoc wireless network that the Apple TV uses. 

Maybe you are looking for