Listening to 2 UDP sockets at the same time

I would like to know if it is possible to listen to two different UDP sockets at the same time without loss of any packets? If so, will the data be buffered ? How do we limit the buffer size on a Windows XP host?

gprassad,
You can use two parallel UDP Read functions working in a loop. Set a timeout to low value and clear the timeout error if it occures. Data transferred by UDP protocol is buffered by operating system and the user has no direct way to change it in LabVIEW.
Arkadiusz Roszczewski
National Instruments

Similar Messages

  • How can I record an Audio Instrument (saxophone) and listen to a reference track at the same time?

    How can I record an Audio Instrument, and listen to a reference track at the same time?

    Are you using an external audio controller or the line-in and headphone jacks on the side of your computer? You shouldn't have an issue using headphones when you're recording through the line-in but you may want to make sure you have monitoring on and it's going to the right place.
    If you're using an external audio controller, try making an aggregate device combining the controller and the "built-in output" into the same device. Go to Applications/Utilities/Audio MIDI Setup, click the "+" sign at the bottom left to make a new device and check the "use" boxes to the left of the physical devices you want to use as part of that aggregate device. That is how I use the computer's speakers or headphones to monitor my input as opposed to only being able to use the output on my audio controller.
    Now that I see some of the questions on the side of this page I realize that the 13" MBPs seem to have only one combined input/output jack... That is an incredibly stupid feature. What on Earth could possibly justify that design decision? I suppose if that's the problem you're having you'll have to buy some sort of splitter (if they even make them) or get an external audio controller like an Apogee Duet or something along those lines. I would be furious if they combined those two jacks on all of the MBPs.

  • Open Ports of Sockets at the Same Time

    Is it any possible I can write a code for open different number of ports for sockets at the same time??
    I try to use thread but it is not work....

    You want to know if you can open more than one socket where each socket uses a different port?
    Yes, you can.

  • How to handle when Client and server write to the socket at the same time

    Hi all,
    I'm writing a socket communication when client and server may write information the the socket at the same time. I look every where but the samples from the internet only shows example of server replies to client after receiving requests from clients.
    Let's say that:
    Client 1 ->Socket 1 -> Server 1
    Now if there are two threads in the server, one blocked waiting for the input from client on socket 1, the second one write something on the socket to client 1, is it possible?
    And if it's possible, if at the time Server 1 writes information to Client 1, Client 1 writes some information to Server 1 too, will there be any conflict problem or the socket could handle that two ways communication simultaneously?
    It's critical questions for me. Thanks for your help.

    I really use Server Client paradigm. However, beside the request, response mechanism, there is also an additional mechanism called update which server periodically send information update to client without the need for a request from client.
    So you suggest client should initiate 2 sockets, one for request and response, one for receiving update from the server? Will this work?

  • Howto send outsream to more than one connected socket at the same time?

    Hi,
    I have a Serversocket socket class which is waiting for connections at a static port. The following code creates the ServerSocket:
    ServerSocket servsock = new ServerSocket(port);
    Then Im wating for clients to access to the server. I do it in a while loop like this:
    while(true){
    client = servsock.accept();
    System.out.println("New client connected");
    After that a put the connected client to e "Temp" variable:
    Socket temp = client;
    Then I Start a new Thread for that client and put it in a Vector:
    Thread v = new Thread (new Visitor(temp,this);
    visitor.add(v);
    v.start();
    } //end of while loop
    The class Visitor implements Runnable and have the constructor:
    public Visitor(Socket sss, MyServer server){
    s= sss;
    In the run method I create the output and input streams like this:
    OutputStream outStream           = s.getOutputStream();
    PrintWriter out               = new PrintWriter(outStream,true);
    InputStream instream           = s.getInputStream();
    BufferedReader appletIn      = new BufferedReader(new InputStreamReader(instream));
    After that Im Starting to Listen in a While loop:
    String line = appletIn.readLine();
    Now to my question: I want to send this "line" to all connected sockets using my vector visitors in my Server class.
    Can I have a method call in my Visitor class that call a method in my Server class? And how can I Iterate over all the elements in the Visitor and in each loop send a outStream to that connected socket?
    Thanx for all help I can Get!
    Best Regards Greeger!

    To send data from the from input stream to the output stream of multiple other sockets, you need to read data from the input stream, then send the same data to each of the output streams.

  • How do I record audio, and listen to it through headphones at the same time? Macbook Pro

    When using midi, everything works great!
    But now I want to record the audio from a piano.. I can't work out how to listen to what I'm recording?
    The same slot is used for the output and the input, so I'm a bit stuck.

    Hi, Jake.
    Are you using an external sound card?
    If so, go to system preferences under the apple in the top RH corner of the menu bar. Open sound and select thus device as your audio output.
    OS X automatically defaults to the laptop's internal speakers ans mic input.
    Hope this helps,
    Regards,
    Scorpii.

  • Possibility of Apple TV playing one Itunes Library while the computer plays a different library at the same time (Mac)

    The Apple TV is for my son's room to watch his videos, listen to music, etc. off his iTunes library I made for him on my Mac.  I want to be able to listen to my own library at the same time he has his. Apple TV only recognizes the current library open; unless I'm doing something wrong or the stars haven't aligned for me yet, is there a way to do this? I can't run two iTunes at the same time (wish I could). 
    *Note- to teach my son about computers, I bought an old green iMac which will be for his learning venture.  The iMac however does not have wifi (at least not yet).  Perhaps something for you Mac professionals can use to help me whip up a good setup, unfortunately the iMac is slow, not enough HD space, so I don't have the funds right now to open it up and do what can be done.  (If this helps)

    Hi All,
    Same issue here. Just upgraded (?) from the previous version of Apple TV, to the new Apple TV2. Like others here, my main problems seem to be with unreliable streaming from iTunes 10 on my PowerMac (Quad G5, Leopard OSX).
    My original AppleTV had no issues w/the wireless network, or synching w/my PowerMac.
    The network connection from the ATV2 are fine, and have no issues accessing the Apple Store (for movies, TV shows), or accessing Netflix. The access to the internet from my ATV2 is quite robust.
    My problems are with keeping a constant, reliable wireless connection to my PowerMac, via an Airport Extreme wireless router.
    I have tried multiple restarts, reboots, reset ATV2 to original settings, tried different wireless channels on the Airport Extreme, verified I have Home Sharing properly enabled in iTunes,etc, but no luck so far.
    What I'm seeing is when I access my iTunes on my computer, I can see my library, and then if I start to "shuffle songs" I may get 1 to 3 songs to play fine, but then the music stops, and I can no longer access the music/movies/etc in iTunes any longer. When I then go to my PowerMac, it has lost most bars of signal strength on the wireless network (although all other devices show strong signal strength), and I have to Turn AirPort Off, then Turn AirPort On and I then am reconnected to the wireless network with good signal.
    I then go back to the ATV2, connect to my iTunes, start my music, and then 1-2 songs later it again stops playing, and I go through this all over again.
    It seems as though there is something on the wireless network between the ATV2 and my PowerMac that causes it to lose connection, and I have to manually start again. The problem is that the connection is not robust, and only lasts a few minutes.
    Hope this gets solved soon.
    Regards
    Tom

  • Music upstairs & downstairs at the same time?

    hi,
    my imac is upstairs hooked up to an amp and speakers.
    my airport express is downstairs hooked up to an amp and speakers.
    without buying another airport express unit, and using itunes, can i listen to music upstairs & downstairs at the same time?
    my mac reseller says no.
    Graham.

    cool, i wrote to apple's wish list about this at least a year ago. if what u say is true then i will be stoked. glad i joined apple discussions and thanks for posting your answer Thomas.
    regards, Graham.

  • Two server sockets on the same machine, one not working.

    Dear forum users.
    I'm currently having a problem with running two server sockets on the same computer.
    It gives no exceptions or anything, just that if i connect with another machine, the last serversocket that started,
    will not accept connections..
    Scenario:
    Computer 1: Main server.
    Computer 1: Game server.
    Computer 2: Client
    Computer 2 connects first to the main server (lets say port 13371)
    Then connects to game server (port 6112).
    Computer 2 failes to connect to the Game server for some reason.
    But if i open a client at Computer 1, connects to main server, and then game server, it
    works fine.
    And if I put computer 2 as a Game server,
    then everything works fine.
    Working scenario:
    Computer 1: Main server.
    Computer 2: Game server
    Computer 2: Client
    Computer 1: Client
    Now, however many that wants to connect to game server, works.
    I have gone through the code 100 times now it feels like. And still dont see why this happends.
    Anyone know if it is "working as intended"? Or just me doing something completely wrong that i cant see myself?
    Sorry for not posting code, its too much code to post.

    Oh, sorry.
    TCPServer:
    protected ServerSocket serverSocket;
    public abstract void processConnection(Socket client);
        public void listen() {
            try {
                report("Listening to clients on port: " + portNumber);
                while (serverSocket != null && acceptConnections) {
                    processConnection(serverSocket.accept());
                    report("Client accepted on serverSocket.");
            } catch (SocketException e) {
                report("TCPServer/listenForClients : SocketException.", e);
            } catch (Exception e) {
                report("TCPServer/listenForClients : Unknown Exception.", e);
            cleanUp();
            report("Stopped listening on port: " + portNumber);
        }MainServer extends the TCPServer:
        public void processConnection(Socket client) {
            try {
                MainServer_Client tmp = new MainServer_Client(client, this);
                synchronized (clients) {
                    clients.add(tmp);
                Thread th = new Thread(tmp);
                th.start();
            } catch (Exception e) {
                report("MainServer/processConnection : Unknown Exception", e);
        }GameServer extends TCPServer
        public void processConnection(Socket client) {
            try {
                client.setTcpNoDelay(true);
                GameServer_ServerClient tmp = new GameServer_ServerClient(client, this);
                synchronized(clients) {
                    clients.add(tmp);
                Thread th = new Thread(tmp);
                th.start();
            } catch(Exception e) {
                report("GameServer_Host/processConnection : Unknown Exception",e);
                e.printStackTrace();
        }Edited by: Lgeee on Apr 30, 2010 2:57 AM

  • Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    Can I use more than one blue-tooth device at the same time on IPhone 4S? Like a wireless headsets and speed and cadence sensor for cycling computer, receive the data and listen music simultaneously

    As long as the profiles are different (ex. HID vs AD2P) you will not have any issues. But say if you try to use 2 keyboards at once, it won't work. Or 2 headsets at once. Your scenario seems fine.

  • How do I listen to music on my iMac and Bose Soundlink at the same time???

    I just bought a Bose Soundlink Color. However I can only listen to either the iMac or the soundlink. Not both at the same time. Can you do this and if you can how do I fix it. Thanks for any help.

    Welcome to the Apple Community.
    Use the multiple speakers option from the AirPlay menu.

  • I bought a bluetooth Bose speaker so I could listen to music from my imac in multiple rooms at the same time. I wanted to use BOTH my existing speakers using the headphone jack and add additional bluetooth speakers in other rooms, but the imac wants me to

    I bought a bluetooth Bose speaker so I could listen to music from my imac in multiple rooms at the same time. I wanted to use BOTH my existing speakers using the headphone jack and add additional bluetooth speakers in other rooms, but the imac wants me to pick one or the other, is there a way to have both?

    I asked same question
    Any answers

  • Can you listen to iTunes on two computers at the same time?

    If I've got iTunes playing on one computer, is it possible to listen on another computer on the same network what's playing on the first computer? I've often got two computers on the go over two floors and it would be smart if they were playing the same music at the same time. Thanks for your help.

    Hi Andy, if you want to listen through remote speakers connected to an AirPort Express you can choose the remote speakers (or computer) from the pop-up menu at the bottom of the iTunes window
    However, to the best of my knowledge you can only listen to iTunes through one set of speakers at a time.

  • How can I listen to music from iphone 4s via apple tv whilst doing a phone call at the same time?

    How can I listen to music from iphone 4s via apple tv while doing a phone call at the same time?
    When I take a call on the iphone, iphone stops streaming the music to apple tv until I finished the call.
    thx!
    Claus
    PS: did ask the same question to apple hotline in germany. Answer: we don´t know... funny

    Welcome to the Apple Community.
    As far as I know you can't, which sort of makes sense, it seems logical to pause whatever you are doing while you take a phone call, which after all is the primary function of a phone.

  • Can i listen to i tunes and use another app at the same time on ipad 4 ?

    I've been trying to figure out how to listen i tunes, or listen to music on a web music site, and play a game at the same time, is that possible to do on an iPad 4 ?

    I can listen to Tunein Radio and play Coin Dozer and Burst Bubble at the same time.
    I can also play music on iTune an play Coin Doser and Bubble Burst at the same Time.

Maybe you are looking for