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?

Similar Messages

  • How do I make Organizer and Editor open at the same time?

    I'm new to PSE 10 and want to know how to make Organizer and Editor open at the same time. I can get the Organizer up, but have to pick out a photo and click on Fix: Full Photo Edit to get Editor to open. Is that the only way to do it?
    Thanks,
    K

    Create Desktop shortcuts for the Organizer and the Editor:
    The Editor's executable is:
    "C:\Program Files (x86)\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe"
    The Organizer's executable is:
    "C:\Program Files (x86)\Adobe\Elements 10 Organizer\PhotoshopElementsOrganizer.exe"
    Ken

  • How to listen to music and record sound at the same time

    I want to figure out a way to record sound and listen to my music at the same time. Most recording apps stop my music when it starts to record and I can't find an app that does both. Any ideas?

    Not possible since the iPod only has one audio processor.

  • How to read two counters and writing AO at the same time with 6024?

    I use Labview to read two quadrature encoder outputs and I use the two
    counters
    of 6024E for this. I can read the encoders continuously. I also want to
    send an
    analog output with a period of 30 miliseconds
    while the reading of encoders is continuouing at the background. How can I
    do
    this. I searched the NI discussion forums and found that my device have
    only 1 DMA channel. Is it possible to overcome the problem using
    interrupt??(set device information.vi) Is there any example code about this
    problem?
    Thanks a lot.."

    Hi Ress,
    I think you might have asked this question twice by mistake. Following is the link to the one that was answered:
    http://exchange.ni.com/servlet/Redirect?id=12017430 .
    Thanks!
    Serges Lemo
    Application Engineer
    National Instruments

  • How do I bounce audio and midi tracks at the same time to burn a CD?

    Hi there,
    I would like to bounce a song with both audio and midi tracks recorded in it onto a CD.
    Despite ensuring that I am doing a realtime bounce (not offline) I am only getting the audio tracks burnt onto the CD - the midi isn't getting bounced to the final output.
    This must be a stupid question, if someone would be so kind as to give me an obvious answer I would be most grateful.
    Thankin y'all
    amata

    Hi A,
    if you use the instrument (with logic virtual synths) tracks for midi,
    it will.
    BTW, why don't you do it offline?
    It will be so much faster.
    Kindly regards,
    Jorge

  • How can I do to acquire and save date in the same time and in the same file when I run continual my VI without interrupti​on.

    I've attached a VI that I am using to acquire amplitude from Spectrum analyzerse. I tried to connect amplitude ouput to the VI Write Characters To File.vi and Write to Spreadsheet File.vi. Unfortunately when I run continual this VI without interruption, labview ask me many time to enter a new file name to save a new value.
    So, How can I do to aquire and save date in the same time and in the same file when I run continual my VI for example during 10 min.
    Thank you in advance.
    Regards,
    Attachments:
    HP8563E_Query_Amplitude.vi ‏37 KB

    Hi,
    Your VI does work perfectly. Unfortunately this not what I want to do. I've made error in my last comment. I am so sorry for this.
    So I explain to you again what I want to do exactly. I want to acquire amplitude along road by my vehicle. I want to use wheel signal coming from vehicle to measure distance along road. Then I acquire 1 amplitude each 60 inches from spectrum analyzer.
    I acquire from PC parallel port a coded wheel signal coming from vehicle (each period of the signal corresponds to 12 Inches). Figure attached shows the numeric signal coming from vehicle, and the corresponding values “120” and “88” that I can read from In Port vi.
    So I want to acquire 1 time amplitude from spectrum analyser each 5
    period of the signal that I am acquiring from parallel port.
    So fist I have to find how can I count the number of period from reading the values “120” and “88” that I am acquiring from In Port (I don’t know the way to count a number of period from reading values “120” and “88”).
    Here is a new algorithm.
    1) i=0 (counter: number of period)
    2) I read value from In Port
    3) If I acquire a period
    i= i+1 (another period)
    4) If i is multiple of 5 (If I read 5 period)
    acquire 1 time amplitude and write to the same
    file this amplitude and the corresponding distance
    Distance = 12*i). Remember each period of signal
    Corresponds to 12 Inches).i has to take these
    values: 5,10,15,20,25,35,40,45,50,55,60............
    5) Back to 2 if not stop.
    Thank you very much for helping me.
    Regards,
    Attachments:
    Acquire_Amplitude_00.vi ‏59 KB
    Figure_Algorithm.doc ‏26 KB

  • How to export an album and keep images in the same order in elements 11 mac

    I made an album of my trip to Australia (lots of pictures) and changed the order of the images (not the same as shooting order) and when I export the images in the album to a folder or memorystick, the images are copied to that place but I lost the album order of the images.
    How can I prevent that, without having to renumber al 500 images separatly?
    Gr Jos

    Thanks for the tip, Michel
    It worked like a charm…
    cheers Jos
    Op 28 okt. 2013, om 18:49 heeft MichelBParis <[email protected]> het volgende geschreven:
    Re: How to export an album and keep images in the same order in elements 11 mac
    created by MichelBParis in Photoshop Elements - View the full discussion
    JosU a écrit:
    I made an album of my trip to Australia (lots of pictures) and changed the order of the images (not the same as shooting order) and when I export the images in the album to a folder or memorystick, the images are copied to that place but I lost the album order of the images.
    How can I prevent that, without having to renumber al 500 images separatly?
    Gr Jos
    The order in album is only kept in the organizer database, so the only way not to lose that order is to rename files.
    If you are using the 'export' function, select your album in custom order, select all photos and in the dialog, choose to rename with a common base name.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5794538#5794538
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5794538#5794538
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5794538#5794538. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to transform a layer object and a path at the same time?

    Hi all,
    I know I am going to kick myself when you tell me the answer to this!
    I would really like to know if there is any way I can manage to to transform both a layer object and a path at the same time....or if there is any workaround to achieve this.
    In a nutshell, say for example I spend a VERY long time creating an intricate path around a very detailed object, and then at the very end notice just how crooked and out of perspective it is, and would like to straighten it.
    Of course I could transform and correct the object, and then carefully transform the path - but it just won't be exact, and I will have to spend a long time adjusting the path and making SURE it is perfect.
    Isn't there any way I could get to transform them together?
    Usually of course I do all the correction to straighten and correct perspective beforehand, but in some instances after I am done creating the path I then notice that the image could have used further adjustments.
    I appreciate so very much any advice you may have:)
    Thank you kindly,
    Christine

    Okay...I found another way as well... suddenly it all started coming to me in the last few minutes:)
    Once the image is on it's own layer, then we can select the path and then make a vector mask by going to "Layer>Vector Mask>Current Path". Once the vector mask is created, simply click on the image icon on it's layer, then transform away to your heart's content, and the path is transformed along with it. Once finished, the path for the vector mask can be saved as usual. (Don't click on the vector mask icon when transforming the image, otherwise only the path will be transformed.)

  • I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • HT201263 When my Ipod touch is in autolock I can only restart the device holding the sleep/wake button and home button at the same time for 10 seconds.  While in auto-lock it is using battery power and will do so until the battery is drained.  Whats wrong

    When my Ipod touch is in autolock I can only restart the device holding the sleep/wake button and home button at the same time for 10 seconds.  While in auto-lock it is using battery power and will do so until the battery is drained.  Whats wrong?

    - Try a reset. Nothing is lost:
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears
    - Connect the iPod to your computer and try to restore via iTunes. Try placing in Recovery mode if necessary to restore.
    - If you can't turn the iPod completely off, let the batter fully drain. After charging for at lerast anhour try again
    - If still not successful time for an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.

  • I need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by ste

    i need to know how to edit a drawing - basically remove the arrows and text but at the same time match the background of the existing pic. then re add new text. how do i erase the arrows and text and arrows but match current background of pic. step by step explanation please beginner

    Please post (a relevant section of) it right on this Forum.

  • Hello i hav an ipad mini and i was in the middle of the ios 8 update and i held the sleep and home button at the same time to cancel the update and now it wants me to connect to itunes i dont no how to do that can someone pleaze help me

    hello i hav an ipad mini and i was in the middle of the ios 8 update and i held the sleep and home button at the same time to cancel the update and now it wants me to connect to itunes i dont no how to do that can someone pleaze help me?

    RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • How do i view itunes store and my library at the same time?

    how do i view itunes store and my library at the same time?

    apple killed this feature (and i'm really unhappy about this!!). please send a request to apple directly. they obviously don't read this forum. the more people complain about this, the better!
    http://www.apple.com/feedback/itunesapp.html

  • My ipod touch 4 gen is in recovery mode and i dont know how to get out of it,i tried everything like hold the home and top button at the same time. All it did what g to the apple logo and went back to recovery mode any help?

    My ipod touch 4 gen is in recovery mode and i dont know how to get out of it,i tried everything like hold the home and top button at the same time. All it did what g to the apple logo and went back to recovery mode any help?

    Once the Device is asking to be Restored with iTunes... it is too late to save anything... and you must continue with the Recovery...
    kevinpowell1 wrote:
    how can i get it out of recovery mode?
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download
    Then See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Take your time... Pay particular attention to Steps 3 and 4.
    Some users have reported as many as 8 or 9 attempts were necessary before success.
    After you have Recovered your Device...
    Re-Sync your Content or Restore from the most recent Backup...
    Restore from Backup  >  http://support.apple.com/kb/ht1766
    If the issue persists...
    Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • My sons iPod touch stopped working, it won't charge in a docking station and the computer/itunes won't recognize it when connected.  We have tried holding the power and home button at the same time for several seconds, and the screen still stays black

    My sons iPod touch stopped working, it won't charge in a docking station and the computer/itunes won't recognize it when connected.  We have tried holding the power and home button at the same time for several seconds, and the screen still stays black.  Thanks!

    Hello skdog I possibly think your ipod touch is black because it has not charged. If your dock is broken it might just mean the dock will be broken and so might be the USB port. You should see an Apple shop nearby and hand it over and see what they can do. I hope this information works!

Maybe you are looking for

  • Configuring Acrobat 7.x to work with the Document Center

    This post is in response to a request that one of the forum members made directly to get additional information about how to configure Acrobat 7.x to use the Document Center. The detailed configuration instructions are available in the Desktop Config

  • 13" Macbook Air, or 13"rMBP

    So i am in the possition that I need to get a new computer, cant really wait.  If I could wait I would wait for new haswell based rMBP.  I am looking at the macbook air, battery a huge plus, and it seems like the gpu would be better for any games I m

  • Rman dupicate db skip tablespace not working reserved words with quoates

    This is how the script looks like set newname for datafile '/oracle/oracle10.2/oradata/smalldb/users01.dbf' to '/oracle/staging/TEST1/users01.dbf'; set newname for datafile '/oracle/oracle10.2/oradata/smalldb/system01.dbf' to '/oracle/staging/TEST1/s

  • Noise when using isight in Movie 08

    I have substantial noise when using iSight in iMovie '08. Please see my example on Youtube Mirno63 labeled test. I would like to have my daughter practice for a recital using isight but the noise is so loud. Please help! Thanks Marian

  • Where is my status bar?

    Hi, i updated to ffx29 and i can't find my status bar. Where can i activate it?