Poor network performance with Websockets running on apple device

I am working on an HTML/Javascript running on mobile devices that is communicating with a Qt/C++ application running on a PC. Both the mobile device and the PC are on a local network. The communication between the HTML page (client) and the C++ app (server) is done using Websockets.
The HTML page is a remote control for the C++ application, so it is needed to have a low latency connection between the mobile device and the PC.
When using any non-Apple device as a client, data is sent to a rate between 60 to 120 frames/sec, which is totally acceptable. When using an Apple device, this rate falls to 3-4 frames/sec. I also checked ping times (Websocket implementation, not a ping command from command line). They are acceptable (1-5 ms) for Apple devices as long as the device is not transmitting data. Whenever it transmits data, this ping time raises to 200ms.
Looking from the Javascript side, the Apple devices always send data at a consistent rate of 60 frames/sec, as any other devices do. However, on the server side, only 3 to 4 of these 60 frames are received when the client is an Apple device.
Does anyone have any idea on what can be happening?
Here is my Javascript code :
<script language="javascript" type="text/javascript">
        var wsUri = document.URL.replace("http", "ws");
        var output;
        var websocket;
        function init()
            output = document.getElementById("output");
            wsConnect();
        function wsConnect()
            console.log("Trying connection to " + wsUri);
            try
                output = document.getElementById("output");
                websocket = new WebSocket(wsUri);
                websocket.onopen = function(evt)
                        onOpen(evt)
                websocket.onclose = function(evt)
                        onClose(evt)
                websocket.onmessage = function(evt)
                        onMessage(evt)
                websocket.onerror = function(evt)
                        onError(evt)
            catch (e)
                console.log("Exception " + e.toString());
        function onOpen(evt)
            alert("Connected to " + wsUri);
        function onClose(evt)
            alert("Disconnected");
        function onMessage(evt)
            alert('Received message : ' + evt.data);
        function onError(evt)
            alert("Error : " + evt.toString());
        function doSend(message)
            websocket.send(message);
        window.addEventListener("load", init, false);
</script>
Data is sent from Javascript side using dosend() function.

What version of websocket is your server using? That is pretty much on the bleeding edge of things. It looks like you need to use RFC6455 and iOS6 and it should work fine.
Thanks for the post. I didn't know about websockets. Very interesting.

Similar Messages

  • Very poor network performance with a G4

    I have a white & grey G4 (1.25GHz and 256MB) running OS X 10.4.5. It's exhibiting very poor network performance, e.g. it will not FTP files over a LAN at more than about 40KB/second.
    Other nodes on the same switch perform fine, as do other ports on the switch. The machine is set to autodetect for speed & duplex, so my question is -- how do I debug this? I've tried swapping network cables already...
    Thanks!
    Chris

    This came down to an incompatibility between the G4 and the Cisco. When the switch is set to force 100Mbit but negotiate duplex, the G4 doesn't like it. Going back to auto speed & duplex fixed the problem...

  • Poor Network Performance from VPN sites

    We are experiencing poor network performance when connecting from hardware VPN sites. VPN sites have Cisco Hardware VPN client 3002 which terminates to Cisco 3005 VPN concentrator. Geting upload/download speeds of 355/484kbsp from VPN to surewest.com. If I remove the VPN and connect laptop directly to dsl modem, speeds are 3mb up and 1mb down. Any ideas what could be causing this?

    Try this
    Adjust the MTU and MSS size in concentrator and client.
    Try these link for more info:
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2284/products_configuration_guide_chapter09186a008015ce0e.html#1223423
    http://www.cisco.com/en/US/products/hw/vpndevc/ps2286/products_user_guide_chapter09186a00803ef6c5.html

  • Poor Bluetooth performance with all aluminum Mac Pro

    The all aluminum case for pre-mavericks Mac Pro is the primary reason for poor antenna performance of Bluetooth. Aluminum, being a good conductor, acts as a reflector of EMF forming what is known as a Faraday Cage, essentially trapping emissions within the box. Normally, holes drilled in the case would allow enough EMF to pass through the case but the hole size for transmission is directly proportional to the lowest frequency that will pass through easily. An example is the typical microwave oven where the window is actually a conducting sheet with small enough hole such that higher freq light waves pass easily through the sheet but lower frequency microwaves do not. Perhaps if the drive bay covers were made of plastic, transmission of the Bluetooth and wifi would be sufficient. One might carefully nibble a slot or two in the side door but this would surely invalidate any warranty and care would have to be taken not to get aluminum particles inside the computer. This would probably nullify any FCC approval of the machine due to clocking noise interference with other devices. The best approach would probably be a tuned waveguide that passes frequencies only around 2.4 GHz ~ 5 GHz through the case (very similar to the way tuned ports on audio speakers pass a band of frequencies needed to extend bass response). I'm sure Apple will have corrected this design flaw in the new Mac Pro introduced this year. If you have lots of time on your hands you can get a college level text on electromagnetics (Maxwell's Equations, etc.) and derive all the details but with a bit of experimenting and reading about tin can antenna mods to wireless routers you should be able to improve Bluetooth performance significantly.

    Thanks for the suggestion.  I will have to move my wireless home base station.  It is on the same desk as my mini so much less than 5 feet away. 

  • Extremly poor network performance

    Hello all. First time post, please excuse any annoyances.
    I'm using a WRT300N Wireless-N Broadband Router connecting three (sometimes four) computers. Two wired and one (sometimes two) wireless, using 802.11G.
    After a long period of time or after a short period of extremely high use (usually bit-torrenting assorted files) my network performance crawls to a near stop. My laptop will show an "excellent" connection but the speed will be 1 Mbps. The wired computers still show a connection of 100 Mbps but cannot connect to anything, including the router (using the web configure site). All connections time out. This happens to all the computers connected at the time and the only cure I've found thus far is to restart the router and or modem. If you need any more information please ask. Below is the information of my router, computers hooked to the router, and the network connection coming in.
    Connection coming in the house:
    Comcast Cable. 6 Meg connection (download)
    Router:
    WRT300N Wireless-N Broadband Router
    Using the latest firmware (0.93.3)
    Using DHCP, Laptop1 and Desktop1 have reservations.
    Laptop1:
    Broadcom internal wireless 'card' running 802.11G
    Desktop 1:
    Intel NIC
    Desktop 2:
    Asus motherboard onboard NIC
    (occasional) Laptop2:
    Dell external wireless card running 802.11G

    I must apologize for one annoyance... the whole post. I skipped step one of posting by forgetting to use that handy-dandy "Search" box located just above this whole post deal, I apologize again. I've found (after searching) that this problem is actually quite common with the 300N and I assume it's a firmware issue, I then assume that Linksys is working day and night, sweating behind a monitor, sleepless and hungry because all they are doing is trying to resolve this issue... then again... you know what they say about 'assuming''.

  • I can see my wi-fi with windows computer, but NOT with any of my apple devices

    I cannot see my wi-fi with any Apple device, but AM able to use my non-Apple comupter

    That is a reversal of note.. normally people are struggling to get their windoze boxes to work.
    Reset the Airport to factory and start over.
    Use all short names, no spaces and pure alphanumeric.
    Leave off the wireless security until you confirm it works... then add wpa2 personal security with a 10-20 character pure alphanumeric password.
    You can also try fixing wireless channels.. test 11, 6, 1 for 2.4ghz in that order.

  • Poor System Performance with Aperture 3

    I am using a MBP (3,1) 15", 4 GB Ram, 2.6 ghz processor with Snow Leopard 10.6.2
    After I run an import of photos, the entire system very nearly comes to a complete halt. EVERYTHING lags while Aperture does its post import processing, and then for 5-10 minutes after it says it has completed.
    I am having the same result on my dual quad-core Mac Pro.
    Is this a happening to anyone else? This product is horrific as it relates to system performance! Any suggestions or tips/tricks to improve performance?
    Please help! Thinking of going back to Aperture 2.
    Jesse

    http://discussions.apple.com/thread.jspa?threadID=2334088&tstart=0
    It hasn't spent much time off the first page of the forum.
    Ian

  • Lenovo W540 poor network performance

    My company recently purchased a Lenovo W540 (Intel i7-4700MQ @ 2.4 Ghz, 16 GB RAM, Windows 8.1 pro 64-bit) for me to use when I am working remote. I have to say that this thing has been an albatross from day one. While it generally performs poorly, the wifi is the worst I have ever experienced. The W540 can only hit a fraction of the network speeds of my 4-year-old Dell Latitude E6400 (1.1 Mbps compared to 2.7 Mpbs on average). The connectivity is very unreliable and I am constantly losing my VPN and VoIP connections.
    I have updated all of the drivers available from Lenovo and Intel as well as removed most of the bloatware pre-installed from Lenovo. Prior to doing so I could only manage .6 Mbps on a good day - using my tethered 3G phone was faster and more reliable.
    I have contacted support twice to gain assistance. Their best offer was to have me drive an hour to the nearest service center for support.
    I am at my wit's end and would appreciate any assistance you can offer before I send this back to Lenovo along with a jar of vasaline.
    Solved!
    Go to Solution.

    Try uninstalling the wifi drivers from device manager before re-installing the latest version. My Intel 6300 card was sticking at 54mbps the other day too, and this seemed to fix it.
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • Extremely Slow Network Performance with 10.5.8

    Let me start off by saying I don't use my mac mini much at all but when I do, the network is incredibly slow and unbearable. Half of the pages don't load, ipsw files for the iPhone take 20-30 minutes (with 15mbps interwebs)
    My network setup:
    1. Modem (provided by ISP)
    2. 2 TB Time Capsule WPA2 security default settings.
    3. Airport Connection
    Now I would be for using 'openDNS' for a resolution but it didn't really improve the issue. Sure it sped up the internet on that machine, but I'm not willing to use a third party DNS when my MacbookPro connecting to the same exact network, doesn't experience this.
    I have removed the hosts file for airport, remove the network connection, reset SMC, to no avail.
    If anybody has any insight as to why my mac mini is the only device with poor performance, that would be greatly appreciated.

    I shouldn't have to use another user.
    Okay. It should also work with your current user but it's not.
    For testing purposes and to narrow down the problem, try another user and see if it works.
    If it works, it is something with the current user.
    If it doesn't work, it is something with the system.

  • SOLVED:Poor networking performance (Slow site lookup)

    I am dual booting with Windoze on the same machine. Websurfing performance on Arch is poor, and I can't figure out why. Windoze surfing with Firefox is instantaneous, whereas on Arch, I get "looking up http:www.google.com....................." for a good 5 seconds, sometimes 10 or 20 seconds, or more.
    It will be fine for a few minutes, and then I get pretty bad stalls like that quite often.
    Heres my rc.conf networking section:
    lo="lo 127.0.0.1"
    eth0="dhcp"
    INTERFACES=(lo eth0)
    # Routes to start at boot-up (in this order)
    # Declare each route then list in ROUTES
    # - prefix an entry in ROUTES with a ! to disable it
    gateway="default gw 192.168.0.1"
    ROUTES=(!gateway)
    And my daemons:
    DAEMONS=(@syslog-ng @hal @network @netfs @crond @alsa @fam @portmap kdm)
    Any ideas?

    lucke wrote:
    Sometimes ipv6 causes problem.
    You might try adding "alias net-pf-10 off" to /etc/modprobe.conf.
    Tried this, and it did not work. Same lag when "looking up" sights.
    High|ander wrote:Try to use your ISP:s DNS (better then letting your router redirect every DNS request)
    Snarkout wrote:I'd add those entries to resolv.conf and see what shakes loose -
    ralvez wrote:I concur with Snarkout.
    The way I have it set up in my system, and works like a charm, is that I have the nameserver set in the router and in my system.
    Ok, this seems to have worked. I plugged the DNS ip entries into the router and my resolv.conf, but DHCPD rewrites the resolv.conf on each reboot. I will consult the wiki to correct that, but even with just the DNS info in the router alone, I tried it out for a good 10 minutes and it was zippy fast, just like Windoze and PCLinuxOS (on my other HD).
    I will wait a day before renaming the thread as "SOLVED", so I can test ouit the results more thoroughly.
    Now, can anyone explain why it works fast under Windoze and PCLinuxOS, but Arch needs the DNS settings? Or is it just one of those weird unexplainable things?
    I am using a D-Link router, if it matters. (IIRC, some routers actually use Linux.)
    :shock:

  • Very slow network performance - with uploads faster than downloads

    I just got new ISP - 100 mbps through a Cat5 line. It checks out when I run ethernet directly to a computer. However, I want a totally wireless network.
    I have a Time Capsule attached by ethernet and that is my main network device. I also have two airport Xpress' to extend the network.
    I am getting, on average, 16 mbps! And, upload speed is generally higher.
    The Time Capsule is about 2 yrs old, but it is an "n" device.
    Anybody have any idea what the problem might be? I was considering getting a new extreme and using the Time Capsule as an extender instead of the expresses because, as I understand it, the express has one band only. Would that be better? Mainly, I want to get the speed up to what it should be.
    Is there some way to trouble shoot the Time Capsule?
    Others in my building with D Link or Linksys routers are getting over 80 mbps wirelessly, so I know it is possible.
    Any help would be greatly appreciated. I want to stay with Apple products, but if not possible I will get another brand of router.
    Thanks,
    Deanna

    Deannanel wrote:
    So, William, I got an Airport Extreme. Within 20 or so feet of it I am now getting 85 to 95 Mbps!
    Great!
    However, in the far reaches of the house, signal is low and I have not been able to extent network with either the Time Capsule or an Airport Express. They just won't connect.
    Based on the earlier numbers you gave me, you won't be able to establish a reliable connection "in the far reaches of the house", as it's too far away from the base router. You'll either have to (1) run Ethernet to that remote unit, (2) use PowerLine units as an Ethernet extender, or (3) put the remote unit closer to the base unit.
    I reset the Time Capsule a couple of times. I noticed that both devices are automatically set to channel 157.
    That's a 5 GHz channel. That band can give faster throughput, but the signal strength falls off faster than in the 2.4 GHz band.
    The Extreme has 2 channels - 2 and 157. I do not have the option of changing the channel on either of the other devices.
    That makes sense, if they're configured to extend an existing network. They must communicate on the same channel as the base station they're extending.

  • Hyper-V Windows 2012 r2 Poor network performance

    Hi,
    Since that I installed Windows 2012 R2 and Hyper-v, I notice that is very slow performing copy operations from the VMs to the physical machine (appears to be lock to 10MB). Firs I though that this issue was only between the VMs and the parent OS, now I realized
    that when copying between this Hyper-v physical host and another physical host in the same subnet I also get only 10MB of speed.
    How do I unlock this 10MB limit??
    The switch and all NICs are GIGABIT capable and before using Windows 2012 r2, using the same hardware boxes I was doing 400MB of transfers between physical hosts and VMs??!!
    Thank you.

    I had the exact same issue with the same AR8151 NIC on my Alienware, only I'm running Windows 8.1. 
    I have a VM with both an external (to the AR8151) and an internal NIC which serves as both a domain controller and router (RRAS) for my other VMs (which only have Internal interfaces).  There is no VMQ setting on the adapter, and I messed around with
    the offload/RSS settings, but performance would drop whenever this VM would be running.  (Internet speed test would go from 95Mbps downstream to about 24Mbps.).  When I paused or shut down the VM, performance would return to normal. 
    I found the issue to be an errant entry in my route table which I have no idea how it happened.  A second default route was created which used the internal IP of the VM with a lower metric.  Simply deleting the route corrected the performance issue.
    Network Destination        Netmask          Gateway       Interface  Metric
              0.0.0.0          0.0.0.0      10.10.1.200        10.10.2.1     
    5
              0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.131     10
            10.10.0.0      255.255.0.0         On-link         10.10.2.1    261
            10.10.0.0      255.255.0.0    192.168.1.200    192.168.1.131     11

  • Poor network speed with 1st generation time capsule and multiple airport express 5Ghz. My network speed slows to a crawl when not close to the time capsule. I get the range that I need, but the speed is painfully slow.

    Hello,
    I have a first generation time capsule running 802.11n (b/g compatable) and the airport expresse's are the newer 5ghz models. I have 3 airport express's and I have the range that I need. I can run the time capsule using 802.11n 5ghz, but I loose the range and can't connect to all of the airport express's. My computers and mobile devices run 802.11n. Does anyone have any suggestions on how to increase the network speed. Would the new airport extreme fix the problem?
    Thank you

    Unfortunately, you are experiencing one of the downsides to 5 GHz. That's because the higher frequency 5 GHz signals are much weaker than 2.4 GHz signals.
    After all, you always have to give up something to gain something else. In the case of 5 GHz, you gain potential speed but in return, you must give up penetration power and distance capability.
    In order to work well, 5 GHz signals need to almost have a line-of-sight relationship between devices. Unless you can achieve this, you will do much better to leave the Time Capsule running at the 802.11n (b/g compatible) 2.4 GHz Radio Mode and allow the Express devices to "extend" that network.
    As for the location of the AirPort Express devices in an exended network, that is critical for best performance. That's because the Express can only "extend" the quality and bandwidth of the signal that it receives. Post back if you need a few more tips on how to find the best location for the AirPort Express devices.
    Would the new airport extreme fix the problem?
    Unfortunately, no.

  • Does anyone else get poor Virtualbox performance with Kernel26-ck?

    I don't know if it's BFS itself or one of my customized options specifically, but if I try to play Netflix inside my Windows XP virtual machine it is terrible and my CPU load is quite high.
    If I boot into the stock Arch kernel I do not have this problem. Anyone else experience this?

    So it seems like it's just me and my config.
    uname -r is different, and I have compiled the kernel modules for it.
    It is only in the last few weeks/month that the performance issue is there.
    Sometimes, when I run the VM, it'll drop me to TTY1 which a bunch of magic output, but it's not a kernel panic. I can switch back to my graphical TTY and everything is fine except the VM is just a black window and has to be forced to close via my WM.
    I'm not sure what kernel config options would do something like this. I have my timer frequency at 1000Hz, which is the main thing I've seen on the Google that can cause problems.
    I am on a Core i3 processor with intel graphics.
    If I post my kernel config, do you think you'd be able to spot anything that would mess up Virtualbox in this subtle way?
    Any ideas? I'm guessing I'm probably on my own.

  • Network setup with PC running Windows 7

    I have a media server running Windows 7, and a Mac Pro with 10.5.8. What I would like to do is to have all my media files on the PC (running 24 hours a day) and nothing on my mac (media). I would like my Mac to "point" to the PC and access all files over my network with programs like Itunes, movies etc.
    Please help me with he best way to setup this network and if there are any limitations. I have tried a SMB share but I have limited networking experience and this isn't working as planned.

    Hey.  Did you ever get this fixed?  Because if not, I have a solution that worked for me.  I had the exact problem you've described -- 64 bit version of Windows 7 (mine is Ultimate), "Always available offline" option not appearing
    on right click...etc.  
    Just out of curiosity, did you happen to use Windows Easy Transfer to move files from an old computer to move to Windows 7?  Because I have a suspicion that the problem lies somewhere in there.
    In any case, here's what I did, step by step. 
    1. Disable Offline Files (Control Panel\All Control Panel Items\Sync Center),
    click "manage offline files" then click disable.
    2. Restart the computer
    3. Delete the CSC folder (C:/Windows/CSC).  NOTE: You may have to change the permissions on the CSC folder in order to do this, and once that is done, you need to delete all the folders within the CSC folder first (starting with the farthest
    in, and working your way out), because the system will not allow you to delete a folder that still has anything inside it.  Once you have all the files within the CSC folder deleted, delete the CSC folder itself. 
    4.  Enable offline files.
    5. Restart the computer.  The CSC folder -- with its default settings, etc., will now be rebuilt, and when right-clicking a network folder, the "Always available offline" option should appear.
    I was experiencing this with a Windows 7 Pro X64 computer connecting to a 2003 server and this resolution worked for me, thank you.  For reference, this was a fresh Factory Win7 Install so there was previously no offline files set up.  When browsing
    to Manage offline files I was unable to view or delete files  as those options were greyed out.  Once i completed the above tasks they were then not greyed out and visible.  Also good to note that other computers (WinXP, Vista, and 7) were
    able to successfully sync offline files with the same server before this issue occurred so it was diffidently a problem with that computer specifically.
    Cheers

Maybe you are looking for

  • ITunes can only perform one thing at a time

    Ever since updating to the latest version of iTunes on my dual core mac mini, iTunes can only perform one task at a time beach balling the entire time.  For example if it is downloading a podcast, and I try and watch something off my apple tv via hom

  • ORA-06502:Numeric or value error ORA-01403: No data found --6502

    Dear All I am using Forms 10g. I am calling a report from my form. but when i am calling then it is showing this error: ORA-06502:Numeric or value error ORA-01403: No data found --6502 My code is in Print Button : DECLARE repid REPORT_OBJECT; v_rep V

  • My macbook pro makes erratic beeping noises

    My macbook pro makes a distinctive, 3 note beeping noise. It repeats at uneven intervals. I went to Console App and saw the following messages repeated at the exact times these beeps happened, so I imagine they are related. I just don't know what the

  • Embedded OC4J not starting, not accessible

    Hello Oracle folks, I have JDeveloper 9.0.5.2 (1618) and had a Struts project. Trying to lauch it in the embedded OC4J does not work anymore (for my colleagues it works). I tried any combination of re-installs and re-imports of the project from CVS.

  • Proto File Naming with spaces?

    It is generally a bad idea to create files with spaces in the file name? Why would Proto do that? Any chance the spaces could be replaced with underscores instead?