Can two java program write to the same port by fetching data from different

can two java program write to the same port by fetching data from different ports, if yes is thing possible for a 3rd program to get all data (is there any data loss or collision)
how is this possible

can two java program write to the same port by fetching data from different portsTwo java clients can connect to the same server port and they can both write to it. However the server will see the connections as two separate accepted sockets.

Similar Messages

  • 2 files running at the same time for adquiring data from different ways

    I want to adquire from a serial port( using VISA) and from a DAQ at the same time. I want data form both devices at the same time.
    My program is a while loop reading continuously from both devices until I stop the while loop with a control.  
    I have noticed that I don't receive right data when I read from both devices in the same program.
    So, I have tried to run 2 different programs, one for Visa adquisition and another for DAQ adquisition, at the same time. At this way i receive data ok.
    So, i want to know how can i do execute 2 different .vi files at the same time and how can i get data from the another one.
    Please, help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!. I don't know what to do!
    Luz 

    Luz,
    you can insert two seperate while loops in parallel into one VI. Please
    take a look into the template browser and the example finder of LV for
    some examples. You can find the template browser by selecting "new"
    (not new vi!) in the file-menu. The example finder is located in the
    help-menu.
    hope this helps,
    Norbert B.
    NI Germany
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Can two apple TV's in the same house share one itunes library?

    Can two apple TV's in the same house share one itunes library and play different movies at the same time?

    I have two ATV G2 and one ATV G1 at home with the same iTunes library. I have played two different movies in the ATVs. One interesting thing you get is that you can start one movie and pause it and then you can continue playing it in the other ATV. The iTunes controls where you pause or stop the movie.
    Agree that bandwidth is the limit here and probably the server throughput. But, so far I haven't experienced any problem.

  • Can two subVI show up at the same time?

    Can two subVI show up at the same time?

    Hi,
    Save the vi as a template (*.vit), then you can open it (dynamically) as
    often as you want. If you make the vi "floating", you get the best results.
    Regards,
    Wiebe.
    "smal" wrote in message
    news:[email protected]..
    > Hi,
    > What if the subvi has to be called dynamically (hence using call by
    > refrence node).
    > In fact I want to run a subvi each time a button is clicked
    > independent of the others(it gets just some parameters from the caller
    > vi & must continue running so the user can interact with it via its
    > front panel )
    >
    > Thanks for your attention in advance.

  • Indesign CC cannot place any jpg format  in my Drive E (psd is OK, jpg in Drive C is OK) while Indesign 6 can. 2 programs installed in the same C drive.

    Indesign CC cannot place any jpg format  in my Drive E (psd is OK, jpg in Drive C is OK) while Indesign 6 can. 2 programs installed in the same C drive.

    You will most likely get better help in InDesign
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • Can multiple LabVIEW programs simultaneously access the same NI-DAQmx hardware?

    I am developing a test station system that, in essence, runs several
    seperate LabVIEW programs simultaneously on the same computer, each
    controlling a different set of I/O channels on one shared set of NI
    DAQ hardware (analog and digital I/O PCI boards with external signal
    conditioning).
    I have already gotten a system like this running almost flawlessly
    using LabVIEW 6.1, NI-DAQmx 7.1 with traditional channels, and older
    E-series DAQ hardware. So long as two programs do not try to write to
    the same output channel simultaneously, everything works exactly as
    expected--I can even read from the same (named) channel simultaneously
    from more than one program. The only issue I have had is that if
    one
    of the compiled applications is closed (not just stopped, but closed)
    while others are still running, Windows XP (SP1) will bluescreen on a
    driver error. This is undesireable, but acceptable (though if there's
    a fix/workaround, I'd love to hear it).
    I am now building a similar system using mostly the same software
    (with an upgrade to LabVIEW 7.1), and I've noticed that the new
    M-series DAQ hardware seems to offer much more bang for the buck than
    old E-series hardware and its kin.
    My question is this: It appears that I/O on M-series hardware must be
    performed with new mx channels, with traditional channels not being an
    option. I am therefore wondering if I will be able to do this kind of
    multiple simultaneous access with mx channels, or if I must purchase
    the classic hardware and use traditional channels for this somewhat
    unorthodox application.
    (Incidentally, the multiple simultaneous program thing is a
    requirement for this system, as it is the only clean way to run
    multiple
    identical copies of the same complete program that only
    operate on different I/O channels, and re-doing the program from
    scratch is not an option.)

    Dear Anonymous,
    Thank you for contacting National Instruments.
    To address your question, I don't know if multiple simultaneous access with mx channels is possible, but I do not see why it wouldn't be. The best way to find out would be to test it. I don't have your program or hardware, so I'm pointing you to some Compatibility VIs. These are VIs that look exactly like Traditional DAQ VIs except that underneath they call the DAQmx driver instead of the Traditional DAQ driver. If your device works when you substitute these Compatibility VIs in for the Traditional DAQ VIs, then you'll know the M Series boards will work for you.
    Here is the link for information about the Compatibility VIs:
    http://digital.ni.com/softlib.nsf/954feaeea92d90918625674b00658b
    83/9d67f671bcc6850586256e630059308b?OpenDocument
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • Can't send and receive on the same port

    Hello,
    I have a socket client which send a message to serverSocket then it should wait for a response.
    The problem I have is that the client send the message but when it tries to open a connection as socketserver on the same port it can't , a have this ERROR CannotGetConnectToTheHost
    this is the code of my client :
    try {
    echoSocket = new Socket("localhost", 3001);
    out = new PrintWriter(echoSocket.getOutputStream(), true);
    out.println(hdr + testContent );
    echoSocket.getInputStream()));
    } catch (UnknownHostException e) {
              System.err.println("Don't know about host: localhost.");
              System.exit(1);
    } catch (IOException e) {
         System.err.println(
              "Couldn't get I/O for "
         + "the connection to: USE host : "
              + e.toString());
              System.exit(1);
         out.close();
         echoSocket.close();
    int compteur = 0;
    try {
    ServerSocket oreille = new ServerSocket(4001);
    Socket socket = (Socket)null;
    System.out.println("Ready to accept connections");
    while (true) {
         socket = oreille.accept();
         System.out.println("\n Nouveau message r�ceptionn� :\n");
         InputStream entree = socket.getInputStream();
         int c;
         String msgAdh = "";
         while ((c = entree.read()) != -1) {
         msgAdh += (char) c; //lecture byte par byte
         compteur++;
         System.out.println("Ready to accept Another Message ");
         entree.close();
         socket.close();
         oreille.close();
    } catch (IOException e) {
    System.out.println("CannotGetConnectToTheHost");
    thinks in advance

    When printing out an exception, print the exception object too, e.g.System.out.println("..whatever...:" + e); It almost always contains useful information. For extra credit, print out the stack trace too.
    If I understand correctly what the program does:
        while (true) {
            socket = oreille.accept();
            oreille.close();
        }That can't be right: after the first loop, you close the socket, and then try to use it again on the second loop. If you want to keep using a socket, keep it open.

  • Two computers connected in the same port dot1x in 3750 in different time.

    I have the following consultation.
    I have a "computer A" connected to a port of switch 3750, configured with: dot1x port-control auto
    dot1x timeout quiet-period 5
    The "computer A" is authorized.
    When I disconnect the "computer A" and I connect a "Computer B", this is not connected, but when I connect the "computer A" again if is connected.
    How many time I should expect to be able to connect the "computer B" in the same port of the 3750?

    When the switch cannot authenticate the client, the switch remains idle for a set period of time and then tries again. The dot1x timeout quiet-period interface configuration command controls the idle period. A failed authentication of the client might occur because the client provided an invalid password. You can provide a faster response time to the user by entering a number smaller than the default.
    The value after the quiet-period is in seconds, so in your case, the switch will wait five seconds before it re-tries for another authentication for the new device connected.
    Please rate helpful posts.

  • Diifferent java apllications write to the same flat file database

    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?
    They should be able to write whenever they want.

    JavaFunda wrote:
    I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file?I guess my question would be: is it a file or a database (as in an RDB)?
    I think EJP's post was aimed at syncing writes to files (and he'll definitely tell me if I'm wrong : )), but it may be redundant if, in fact, your output is going to a database.
    Also, Java has some quite sophisticated logging applications (I believe log4j is quite popular; but there are others), which may serve your needs.
    Winston

  • Can two blue tooth headsets use the same iPad?

    as the header says can me and my wife using blue tooth head phone both connect to the same ipad to listen to music or a film?
    cheers
    pete

    The wireless Bluetooth technology used by the iPad allows for the audio signal to http://support.apple.com/kb/ht3647. While you can normally use only one set of headphones at a time with the iPad, third-party accessories may offer a solution.
    For example, some users have http://science.opposingviews.com/use-two-bluetooth-headsets-same-time-15106.html with add-ons like a Kokkia multi stream Bluetooth transmitter (starting around $60 at the http://store.kokkia.com/adaptersdongles.aspx), which promises to stream the audio from an iOS device to two different headsets. Depending on your iPad model, you might need additional adapters to fit a multi stream Bluetooth transmitter to the tablet’s connection port, so you may want to do more research before you buy.
    Although you lose the freedom of a wireless connection, using two sets of wired headphones and a Y-shaped splitter for the iPad’s headphone jack is another way to share the sound. Some headphone splitters can be found online for around $5 or less.
     Cheers, Tom

  • Can two Macbook Pro's share the same Itunes folder(all media in Ituens) on an external drive (like Time Capsule)? How and what issues may arise?

    Hey, I have two macbook pros (250 gb). They are both running out of space. My first thought was to share an iphoto library off of Dropbox or our Time Capsule. But, I heard that if one file gets corrupted (interenet cuts out, for example) then the whole library gets corrupted. Well, we're full again and now I am wondering if I could move our Itunes folders to our Time Capsule, sync/sort them both so there won't be any duplicates and then use this as a shared itunes library. So first, is this possible? Both computers share the same itunes account.
    Second, if I do, and I purchase a song, show, whatever, does it automatically be added to the itunes library on our Time Capsule and then it is available for both computers to access? Or do  I need to "import" it on both?
    Third, does the "file corruption" issue listed above pertain to itunes?
    I saw a discussion about this but it was form 2008. I am sure things have changed a bit since then.
    Thanks for the help!
    jbh

    No.

  • Can two Instances of Planning share the same SQl Server Instance?

    Hi
    Can anyone clarify me on the below
    Is it possible to have our DEV and TEST instances of planning (on different host servers) point to different tables in the same instance of SQL Server 2005. I know that the apllication databases can be directed to different table names but what about the core tables:
    FSDHAADMS
    FSDHBIP
    FSDHSS
    FSDHPLANAPP
    FSDHPLANSYS
    Thanks in advance.

    I think it will work. As long as you create separate SQL databases for the planning system files for dev and prod on the sql server. If your planning web for dev is deployed on server x, and planning web for prod is on server y, when you run config utility on server x you would point to the SQL database u created for dev. Repeat on prod when u run the config utility just point to the planning system database you created for prod.
    haven't done this myself but sounds possible.

  • Can two iPhones be used under the same email on iTunes and copy music to both phones?

    My family and I just all got the iPhone 3GS. i already had an iTunes account because I had the iPod nano, so now that i have the iPhone as well all i had to do was put in my e-mail on my account and most of the songs were synced to my phone. However, my mom (who has the same phone) was wondering if it's possible for both of our iphones to be registered under my account on iTunes. If so, how do I do it? If not, is there any way I can sign out of my account but transfer the songs i already have to my mother's iTunes account on the same computer? She made her account the day we got our phones but does not have any music since this is her first time using iTunes.
    Thanks for the help!

    Absolutely. If you share everything, including music, calendars address books, etc., you can sync both phones to one iTunes/iCloud account.  If on the other hand you want to have separate music libraries, calendars and such then you will need to set up separate accounts.

  • Can two copies of LR access the same library at the same time?

    I am in a small studio with multiple Mac workstations and multiple copies of LR. We often have shoots where one person will work on photos from the reception of a wedding while another person works on the ceremony photos at the same time. So far we just export the XMP metadata to the DNG files when we are done working on one machine and import the XMP metadata of those files on the other computers to have the changes up to date.
    Currently we are all using our own libraries. The only problem is that virtual copies do not transfer in this process.
    Can we all use the same LR library at the same time to work on different parts of an event, and therefore all be able to see the virtual copies, collections, and other changes that we make to images including the images that we send to PSCS2 to further edit and then re-import?
    Does anyone know if this will work, or will it bring about the end of the world as we know it?

    Since the beta had it, under the name of "binders", it's something that's been thought out, put in, but pulled when the switch was made from collections to folders as the primary "keeper" of the images. So I feel there's good reason to expect it back at some point.
    <br />
    <br />One way or the other, it probably will not signal the end of the world!
    <br />
    <br />
    <span style="color: rgb(102, 0, 204);">John "McPhotoman"</span>
    <font br="" /></font> color="#800000" size="2"&gt;~~ John McWilliams
    <br />
    <br />
    <br />
    <br />MacBookPro 2 Ghz Intel Core Duo, G-5 Dual 1.8;
    <br />Canon DSLRs

  • Can two separate Icloud accounts use the same device?

    My wife has already registered and I cloud account on our shared IPad. I am late to the "cloud" band wagon but now need to transfer a lot of data between my phone and I pad. Can two I cloud accounts be used on a shared device such as our iPad?

    Yes. Launch iTunes with the Shift key held down as needed, or use separate Windows user accounts on the computer.
    (107261)

Maybe you are looking for