2 Replies Latest reply on Dec 2, 2011 11:58 AM by Flex harUI

    Binary sockets

    skanthi Level 1

      Hi,

       

      Is there a  way to set or increase the buffer size on the socket instance.?

       

      Thanks ,

      Kanthi

        • 1. Re: Binary sockets
          jobigoud

          I am also interested in increasing the buffer size on the Socket instance.

           

          In my scenario, the Flex socket is on receiving end. I have found that it will only receive chunks of ~40KB, while I would like to receive bigger chunks to avoid the overhead.

          The sending side (C#) is already configured with a SendBufferSize of 3MB, but unfortunately it doesn't affect the number of available bytes received at each SOCKET_DATA event.

           

          Just for the kicks, here is what the .NET documentation has to say about it:

          Your network buffer should be at least as large as your application buffer to ensure that the desired data will be available when you call the NetworkStream.Read method.

          If your application will be receiving bulk data, you should pass the Read method a very large application buffer.

           

          Is there any way to perform similar configuration in Flex ?

          • 2. Re: Binary sockets
            Flex harUI Adobe Employee

            I don’t know of any way to do that, but I’m not an expert in Sockets either.  Flash sockets are event driven.  You can’t just sit and read a huge chunk.  You could just wait until bytesAvailable reaches a big number before reading the data and handling it.