Writing to socket with setinterval not working in windows

Hello Everyone,
I'm trying to stream a big file to my server, and was using 'setInterval' just fine to slowly upload it from OS X, but when I moved my AIR application to a Windows Vista computer, it no longer worked. I started doing some investigation and found out that 'socket.writeBytes' function was not working inside of 'setInterval'. I then moved the code inside of 'setInterval' to outside of it and everythink worked, but obviously it was no longer streaming. Thinking there was something wrong with 'setInterval', I tried it  without the 'socket.writeBytes' function in it, and it started working fine.
Not sure what is happening, but it seems like a bug in the air.Socket code.
Here is my code:
    var socket = new air.Socket();
    socket.addEventListener(air.Event.CONNECT, function(e) {
        var stream = setInterval(function() {
               socket.writeBytes(filePart, 0, filePart.length);
                if (isDone) {
                    clearInterval(stream);
        }, 1000);
    socket.connect("myServer", 80);
P.S. I also tried using 'air.Timer' and it was the same behavior as 'setInterval'.
Thanks for any help.

Hi,
You should use the flush method:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html#f lush%28%29
"Flushes any accumulated data in the socket's output buffer.
On some operating systems, flush() is called automatically between execution frames, but on other operating systems, such as Windows, the data is never sent unless you call flush() explicitly. To ensure your application behaves reliably across all operating systems, it is a good practice to call the flush() method after writing each message (or related group of data) to the socket."
I hope this helps!
-Erica

Similar Messages

  • Admin console with CU4 not working on Windows 8.1

    I cannot get the admin console with CU4 to work on Windows 8.1. 
    I don't get any errors when I install it. But after installation I cannot connect to any site.

    Hi,
    Please try the solution in the blog below.
    1. In Configuration Manager Console click "Connect via Windows PowerShell"
    2. Type A for "Always run"
    Solve ps-drive problem with SCCM2012 sp1 powershell script
    Note:
    Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Best Regards,
    Joyce
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • [SOLVED] OSCDIMG Tool Does Not Work on Windows 10? ReadFile() fails with error code 87. (The parameter is incorrect) on ReFS Storage Space Mirror

    Hello,
    What could be the reason of OSCDIMG premastering tool not working in Windows 10?
    I'm trying to rebuild ISO from the admin setup point and having problems with OSCDIMG failing to read files from the master folder:
    E:\Images>bin\oscdimg.exe -bootdata:2#p0,e,b"D:\ISOFOLDER\boot\etfsboot.com"#pEF,e,b"D:\ISOFOLDER\efi\Microsoft\boot\efisys.bin" -o -h -m -u2 -udfver102 -lwinsetup D:\ISOFOLDER test.iso
    OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
    Copyright (C) Microsoft, 1993-2012. All rights reserved.
    Licensed only for producing Microsoft authorized content.
    Scanning source tree (500 files in 15 directories)
    Scanning source tree complete (950 files in 95 directories)
    Computing directory information complete
    Image file is 3591864320 bytes (before optimization)
    Writing 950 files in 95 directories to test.iso
    0% complete
    ReadFile failed (\\?\E:\Images\ISOFOLDER\autorun.inf, off=0 len=800 status=103)
    Error 87: The parameter is incorrect.
    Thank you.
    Well this is the world we live in And these are the hands we're given...

    Figured it myself.
    For some reason, the tool does NOT support source locations on ReFS formatted drives. Move the D:\ISOFOLDER location to NTFS formatted drive, and the tool works flawless:
    E:\Images>bin\oscdimg.exe -bootdata:2#p0,e,b"D:\ISOFOLDER\boot\etfsboot.com"#pEF,e,b"D:\ISOFOLDER\efi\Microsoft\boot\efisys.bin" -o -h -m -u2 -udfver102 -lwinsetup D:\ISOFOLDER D:\TEMP\test.iso
    OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
    Copyright (C) Microsoft, 1993-2012. All rights reserved.
    Licensed only for producing Microsoft authorized content.
    Scanning source tree (500 files in 15 directories)
    Scanning source tree complete (950 files in 95 directories)
    Computing directory information complete
    Image file is 3591864320 bytes (before optimization)
    Writing 950 files in 95 directories to D:\TEMP\test.iso
    100% complete
    Storage optimization saved 45 files, 16310272 bytes (1% of image)
    After optimization, image file is 3577761792 bytes
    Space saved because of embedding, sparseness or optimization = 16310272
    Done
    Well this is the world we live in And these are the hands we're given...

  • Axis bank net secure with webpin not working on ipad2

    Hi,
    Axis bank net secure with webpin not working on ipad2
    Lt me know how to proceed

    Try using their App:
    https://itunes.apple.com/in/app/axis-bank-mobile-application/id517266358?mt=8

  • Since installing Yosemite, Airplay with Freebox not working

    Since installing Yosemite, Airplay with Freebox not working
    With Maverick Airplay working well

    If you haven't done so already, try resetting the printing system.
    OS X Mavericks: Reset the printing system  also Yosemite
    Try deleting the printer and scanner and add them back.
    Also try Applications/Image Capture to see if it can find the printer and scanner.

  • Wifi connection with 4s not working after installing new software ios6

    wifi connection with 4s not working after installing ios 6.

    Go to Settings > WiFi > Select your network and hit the right arrow to "Forget Network"
    Then go to Settings > General > Reset Network Settings  and try connecting again when the phone restarts.

  • Activesync not working for Windows Phone with certificate

    We have a new Exchange Server 2013 setup and using activesync.  We have setup a policy to require simple password and to send an email to provision a device when it connects.  Activesync is setup to use self signed certificates,  this was
    tested first on the Ipad.  Certificate installed entered the settings and the device appeared in the quarantined devices list awaiting to be approved.  This was also done on the Iphone and worked. 
    When putting the same certificate on the windows phone device it errored with there is a problem with {as.domain-name.net} and does not appear in quarantined devices screen.
    I tested again with another Ipad and an android device and they work without an issue.  Tested with a Windows RT device and got the same issue.  If I look in the IIS log files I can see the windows device making a connection then when I presume
    to be the error 500 at the end of the line. 
    This is not a user issue as I can use the same user on the various devices.  The windows devices just do not want to connect.  We have looked at the certificate but if it works for apple and android devices why does it not work for windows? 
    Is there any additional security settings that need to be turned on or off for windows phones?  Is there something specific on the certificate what windows devices need that others ignore?

    I did inital think it might be a widows phone issue but there are no other settings for me to use.  I have also tested using a windows 8 surface and I get the same issue.
    I have raised the event log level on the exchange server to expert and I have seen 2 messages when I try to connect. 
    I get Event ID 1100:  Exhcnage ActiveSync device requests for your uses are being blocked.  This problme frequently occurs when HTTP OPTIONS method is not allowed.
    I know it is allowed as the test exchange connectivity worked and passed that test.
    The other error Event ID 1309 ASP.NET warning.  Part of the exception messge is DeviceTypeMissingOrInvalid
    I have come across a comment that says for certificates to work you need to use windows intune or SCCM which we don't have.  Do we know if this is true? 

  • I'm having constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. I can, however, work well in Explorer.

    For the last few weeks I have had constant problems with pages not working. I.E.: I cannot fill in writeable fields, click on buttons... or anything... nothing on the page works. And, this is not exclusive to a particular site. It does seem to be a browser issue, because I can work well in Explorer.

    Both the Yahoo! Toolbar extension and the Babylon extension have been reported to cause an issue like that. Disable or uninstall those add-ons.
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Applications associated with workstations not working

    Hello,
    I have onld zen 7.x, on netware.
    Applications associated with workstations not working or appearing in one container. Not sure if it every worked. Apps work fine with users.
    I am in a bind, since I need to get the app out in the workstation space.
    It maybe rights or simple install error with the ZEN from the begining.
    thanks for any help or ideas.. Yes I know I need to get to Zen 11.
    Phil

    PhilJannusch,
    > Applications associated with workstations not working or appearing in
    > one container. Not sure if it every worked. Apps work fine with users.
    >
    > I am in a bind, since I need to get the app out in the workstation
    > space.
    Please tell us more as "not working" can mean a lot of things. So:
    Are they user or workstation associated?
    Are those for whick they do not work (users or workstations) all in the
    same container?
    In what way do they not work?
    Any errors?
    Anders Gustafsson (NKP)
    The Aaland Islands (N60 E20)
    Have an idea for a product enhancement? Please visit:
    http://www.novell.com/rms

  • I am getting frustrated with Apple not working with Flash player on some of my favorite web sites. Is there any alternative that will work on I-pad instead of flash?

    I am getting frustrated with Apple not working with Flash Player on some of my favorite web sites! Is there another alternative to watching these site options on my I-pad?

    Flash is not, and probably never will be, supported on the iPad : http://www.apple.com/hotnews/thoughts-on-flash/ . Plus it would be up to Adobe to make a version of their flash player that works on iOS devices - something which they have never managed to do and which they have now given up on trying to do.
    Browser apps such as Skyfire, iSwifter and Puffin 'work' on some sites, but judging by their reviews not all sites. Also some websites, especially news sites, have their own apps in the App Store, so your could try checking there for your sites (and there is the built-in YouTube app).

  • My orignal computer that I sync my iPhone 4 with does not work...can I sync it with a new computer?

    My original computer that I set up my iPhone 4 with
    Does not work.....can I use a new computer to sync
    The phone....how do I do this and is there a risk of
    Of losing any apps, music etc

    Try this:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive

  • Amd suitchable graphics with hd6670 (and intell 3000 ) will not work on windows 10

    hi there i have amd suitchable graphics with intell , and the amd will not work on windows 10 pro x64 the actual model of the amd is HD 6670 but is using the drivers of the hd6470. in any case it will not work in windows 10 pro x64 after a clean install. please any help thanks

    Have you disabled the firewall in you security system?  Windows firewall rarely gets in the way, but security systems' do.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Exporting Crystal Report to HTML is not working in Windows 7

    Hi Sir,
    I am trying to export Crystal Report to HTML format using VB.NET code. Functionality is working fine at Windows XP Environment (Save to Disk, Open an Application and Email Attachment). But the same functionality is not working at Windows 7 Environment (both 32-Bit as well as 64-Bit).
    Below is the code to Exporting Crystal Report to HTML in VB.NET.
    Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions
    Dim CrFormatTypeOptions          As New HTMLFormatOptions
    Dim vFormat As Integer
    Dim CrExportOptions As New ExportOptions
    Dim vRdReport As New ReportDocument
    Dim sfd As SaveFileDialog
    Dim vFileName As String = Nothing
    vRdReport = vRptSource
    sfd = New SaveFileDialog
    If Not (vRptPath = "") Then
        sfd.InitialDirectory = vRptPath
    End If
    sfd.Filter = "Webpage, Complete(.htm;.htm)|.htm|Web Archive, Single file(.mht)|.mht|Webpage, HTML only(.htm;.html)|.html"
    If sfd.ShowDialog = DialogResult.OK Then
        ' Set the disk file options.
         CrDiskFileDestinationOptions.DiskFileName = sfd.FileName.ToString()
    Else
         Return
    End If
    CrExportOptions = vRdReport.ExportOptions
    CrFormatTypeOptions.HTMLFileName = vFileName
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLEnableSeparatedPages = True
    CrFormatTypeOptions.HTMLHasPageNavigator = True
    CrFormatTypeOptions.UsePageRange = True
    With CrExportOptions
                        .ExportDestinationType = ExportDestinationType.DiskFile
                        .ExportFormatType = ExportFormatType.HTML32
                        .DestinationOptions = CrDiskFileDestinationOptions.DiskFileName
                        .FormatOptions = CrFormatTypeOptions
    End With
    vRdReport.Export()
    Catch ex As Exception
            MsgBox(ex.ToString)
    End Try
    Code working fine at Windows XP, But it is not woking in Windows 7 environment.
    Please can anyone share your valuable thoughts or ideas reg. this.
    Thanks in Advance
    Deivanayaga Perumal D.

    user13509659 wrote:
    Run this code to reproduce the issue.Which issue?
    It looks like inheritance is broken in the component hierarchy for JFrame in Windows 7 JDK 1.6.0_23-b05. The only thing remotely related to inheritance in your code snippet is the WindowListener, which does little. See camickr's advice about built-in exit management.
    EDIT - using the post title as a clue, I realize you may be talking about the component hierarchy, and whether the contentPane's background is visible through the upper layers. Instead of guessing, I'd prefer you describe your "issue" accurately (observed vs expected behavior).
    Edited by: jduprez on Feb 10, 2011 1:01 PM

  • Flash player does not work in Windows 8 tiles

    Flash player does not work in Windows 8 start metro tile applications. Flash player also does not work in Windows 8 start tile internet explorer 10 1n windows 8. Flash player does work in Windows 8 desktop internet Explorer 10. I tried all of the recommended fixes suggested by adobe Flash Player Issues/windows 8 page. I have reinstalled Windows 8 operating system.  What should I try next?

    This is a known issue with Flash Pro CC - GM build.
    this crash has been fixed in the update that was released recently. Please update to 13.0.1.808 version and it should fix this.
    Please reply if it still persists after the update.
    -Sujai

  • HP Laserjet P1006 is not working on Windows 7 (64-bit).

    I lost my original CD-Driver and I tried to download the CD-Driver on HP website but it doesn't work when I click printing.  It seems that my HP Laserjet P1006 is not working on Windows 7 (64-bit).
    Can anyone give me a link that works for installing driver for HP Laserjet P1006 for Windows 7 (64-bit)?  
    Thanks for helping!

    Hi @achieverone ,
    I can help you with finding the drivers for the Laserjet P1006.
    Just to clarify, you were able to install the printer software, but it just isn't printing correct?
    Here are the two drivers available for Windows 7 64 bit.
    HP LaserJet P1000-P1500 Hostbased Plug and Play Basic Driver.
    HP LaserJet P1005/P1006/P1500 Printer Series Full Feature Software and Driver.
    Try and print a hardware self test on the printer to find out if it is a hardware or software issue.
    Open and close the lid five times quickly. It should print off a page with black lines on it.
    Download and run the Print and Scan Doctor. It will diagnose the issue and might automatically resolve it. Find and fix common printer problems using HP diagnostic tools for Windows?
    What were the results when you ran the Print and Scan Doctor? (did it print or scan, any error messages)
    If you need further assistance, just let me know.
    Have a great day!
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

Maybe you are looking for