Windows 7  Professional UDP Buffer Size

Posted on 2011-04-27
Last Modified: 2016-03-02
On a Lenovo ThinkPad with Windows 7  Professional, I send and receive UDP packets with Matlab using a program called judp.m that I downloaded here:

My current application receives about 400 packets per second, each about 45Kbytes, from another server on the same LAN. Each packet has a unique index. About 1 to 2 percent of the packets are dropping; I can tell by looking at the packet index. I suspect that my UDP receive buffer is too small.

Two questions:

First, how can I tell my UDP buffer size?

Second, how can I increase it to 65535?

Question by:countydave
    LVL 13

    Expert Comment


    Author Comment

    I need a Windows or Matlab solution, not a C solution. Thank you.
    LVL 13

    Expert Comment

    I suggest contacting either Microsoft or Metlab Support. I am unaware of any way to do this without using Windows CE 5.0 and I have not seen any documentation on commands to change this.

    If you are trying to increase the size of the packets you can adjust the MTU, however this is limited at other points in the network.
    LVL 15

    Accepted Solution

    If you have Instrument Control Toolbox for MATLAB you can create UDP object with defined InputBufferSize property.
    u = udp('','InputBufferSize',65535);

    Open in new window

    Read the documentation for more info:

    For an existed udp object you can get or set any property:
    uibs = get(u,'InputBufferSize');

    Open in new window


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
    The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now