MultiClient servers: Send to all clients and only certain ones?

I've got Multiclient servers down as far as the Sun Java tutorials go, but I'm having some trouble figuring out how to be able to have the server be able to send to both all clients listening, and be able to send to a certain client, identifiable by some name (I'm guessing by IP address or something). My main problems:
I don't really know how to identify the threads.
I can't seem to think of a way to be able to send to every client, or to send to one client.
I don't really need any long code blocks, just an overview of the process and maybe steps.

Every time a client 'logs on' you create a new instance of your client handler which holds the socket information etc. Maintain a map in the main server that maps user names to the client handlers and add a client handler to the map as it is created. To sent a message to all, send to all client handlers registered in the map. To send a message to one, lookup the associated client handler in the map and sent the message to that client.

Similar Messages

  • I have just synced my iphone to my computer and all of my contacts went onto the computer and off my phone !! i have a mac .when i sync contacts i click on all contacts and only seven are going onto the phone !! can someone please give me an awnser

    i have just synced my iphone to my computer and all of my contacts went onto the computer and off my phone !! i have a mac .when i sync contacts i click on all contacts and only seven are going onto the phone !! can someone please give me an awnser

    When you connect the iPhone to sync with the new computer,  a number of things will happen. If the new computer/iTunes does not contain any music, then yes, you will receive a prompt saying this iPhone is synced to another library, and if you continue, you will lose your music. However, you risk losing a number of other things, such as apps, contacts and calendar data. When you ask about photos, any photos that you have on the iPhone that were synced from the previous computer would also be lost. You need to save the photo folder from the old laptop and transfer that to the new desktop. You also need to sync the contacts and calendar to the same supported application that you were using in the past, such as Outlook, unless you are using an outside web-based sync, such as Google. Also, when you first connect the iPhone, it will make a backup, or at least make sure that it does before you attempt to sync, or you will not have a backup of some of the other things, such as mail settings, SMS, and the contents of the Camera Roll. I would import the photos from the camera roll to the new computer before trying to do anything else in iTunes.

  • My iphone 4 is taking forever to sync...I let it sync all night and only completed about 1/4 of of the songs downloaded. Apps seem to be fine. I have tried restoring it and that didn't do anything. Can someone please help?

    My iphone 4 is taking forever to sync...I let it sync all night and only completed about 1/4 of of the songs downloaded. Apps seem to be fine. I have tried restoring it and that didn't do anything. Can someone please help?

    how many songs are syncing cuz i only have at most 200 or so and it takes a while so it might be how many songs are syncing to the device

  • Is there any table in data dictionary has all clients and their email ids?

    Is there any table in data dictionary has all clients and their email ids?

    Hello,
    KNVK-ADRNP_2
    use this to pass to the bapi BAPI_BUPA_ADDRESS_GETDETAIL. this is function module & will return the address details in diff itabs..
    You can also try the Table ADR6 field SMTP_ADDR where ADDRNUMBER = KNVK-ADRNP_2.
    *************Reward points,if found useful

  • I created a watermark in LR4 and it applied to all photos I only wanted one photo marked.

    I created a watermark in LR4 and it applied to all photos I only wanted one photo marked. How can I keep it from adding the watermark to all of my photos?
    I want to be able to add them manually to each photo in a location that I chose so the photo is still visably appealing.
    Thanks!

    I think it's a feature of the Web Module, since it is assumed that you would want the watermark on all images of a web-gallery.
    But, in this context (as always is the case in Lr) you have to take into consideration of how Lr works. Lr never ever changes your originals.
    "Watermark applied" means only that there is a set of data in the Lr catalog that says something like "when uploading the web-gallery the watermark has to be applied to the uploaded JPGs".
    Nothing has been done to your originals - even though they are displayed in te Web Module with the watermark. The orginals are ever unchanged.
    If you go back to the Library Module (within the same Collection) you won't see a watermark.

  • I had free adobe reader and i scanned a doc to send to a client and as of last night i could not send as an attachment thru my email. So I paid for the 89.99 year adobe pkg and it still wont let me email a scanned and saved doc. it says 'an unknown error

    i had free adobe reader and i scanned a doc to send to a client and as of last night i could not send as an attachment thru my email. So I paid for the 89.99 year adobe pkg and it still wont let me email a scanned and saved doc. it says 'an unknown error occurred'?

    What exactly means "could not"?
    And what Adobe product/service did you pay for?

  • Accept all editions and changes with one click in a PDF document

    In Adobe Acrobat (7.09) I see how to accept changes in a PDF document individually, but is is possible to accept all editions and changes with one click, as it is in Word for example. For tips thanks in advance.

    Hi,
    To save usernames/passwords, you may have to make sure that '''Remember passwords for sites''' is still enabled in '''Tools''' ('''Alt''' + '''T''') > '''Options''' > '''Security''' while at the same time in the '''Privacy''' tab, '''Never remember history''' or '''Always use Private Browsing''' shouldn't be enabled and if '''Settings''' is visible here, make sure that '''Saved Passwords''' is not enabled (ticked).
    [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Security%20panel?as=u Security panel]
    [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Privacy%20panel?as=u Privacy panel]

  • In iTunes I click on a song and when I click on the "get info" tab, it opens up but everything is gray - locked, therefore, I cannot edit the year or genre of the songs. Not every song is locked, only certain ones for some reason. Any help?

    In iTunes I click on a song and when I click on the "get info" tab, it opens up but everything is gray - locked, therefore, I cannot edit the year or genre of the songs. Not every song is locked, only certain ones for some reason. Any help?

    I ran into the same problem, I think that, If you tab on a song that is on your IPOD, and the song data is grayed-out, I think it means that the song is probably twice on your IPOD and that the iTunes directory can not edit THAT song data for two (or more) files @once. Check if this is the case, sinceI have the same problem,am looking for a way to have One and the same song in more playlists but only keep the song once on the IPOD.

  • I paid for Export PDF and only got one download

    I just purchased Export PDf and only go one download.  How to I get access to the unlimited version I just paid $19.99 for?

    Hi,
    We are sorry for inconvenience , we are aware about this issue and engineers are currently working to get this fix as soon as possible.
    ExportPDF service would be up and running soon and you would be able to use your service you paid for. Thanks for your cooperation
    ~Pranav

  • How to Unlock all folders and Files in One Main Folder

    How do i unlock all files and folders in one main folder? This way I wouldn't have to do it over 1,000 times to fix my folders I imported from my external drive.

    Open the Script Editor in the /Applications/AppleScript/ folder and enter the following:
    tell application "Finder"
    set locked of every item of entire contents of (selection as alias) to false
    end tell
    Select the main folder in the Finder and run the script.
    (39015)

  • I signed up for 20 bucks a month to use photoshop and only got one day of use.  Where does that get

    I signed up for 20 bucks a month and only got one day of use of Photoshop.  Where does that get off?

    What error are you receiving?  Do you have a subscription to Photoshop CS6?

  • Recording stereo audio and only getting one side - what gives?

    Recording audio in stereo mode in logic and only getting one side showing on the meter and same side showing on the audio file - I've checked the interface - is there a logic setting I'm missing?

    Is Universal Track Mode enabled?

  • My iPhone 5 only charges with my lightning port cable and only on one side. I've tried buying a new cable but that doesn't work.

    My iPhone 5 only charges with my lightning port cable and only on one side. I've tried buying a new cable but that doesn't work.

    Since there's no one side on a lightning cable, make an appointment with genius bar for an evaluation.

  • I'm wanting to migrate certain applications from my MacBook Pro over to my newer Mini, but Migration Assistant doesn't allow doing this by choosing which applications to migrate-how can I pick only certain ones?

    I'm wanting to migrate certain applications from my MacBook Pro over to my newer Mini, but Migration Assistant doesn't allow doing this by choosing which applications to migrate-how can I pick only certain ones?

    You only bought it four months ago, so it's still under warrantly.
    Call Applecare or call your nearest Applestore to make an appointment. Tell them your mac has serious technical issues, describe them shortly.

  • Using BAPI to create users across all Clients and R/3 Systems

    Hi everyone,
    I'm currently writing a program where I'm using a BAPI to create multiple new users via central user admin (SU01) and assigning Roles to these users.
    My objective is to create these new users in all clients of all R/3 systems using RFC. At the moment, in SM59, our DEV environment is set up as "DEV", QA as "TST" and PRD as "PRD". When I use syntax:
    CALL FUNCTION 'BAPI_USER_CREATE1' DESTINATION 'TST' the system presents a logon screen to login to TST system. Can this logon be made automatic i.e. without this screen prompt?
    Also, I can't create the users in all clients of 'TST'. Our test system has 5 clients...how do I create the users in all clients of TST automatically?
    Your help will be greatly appreciated.
    Thanks.
    Sougata.

    Try to see the SAP HELP:
    RFC logon to target system (remote logon)
    RFC logon within an R/3 system can be successfully undertaken using the same user ID even if the logon is to take place in a different client.
    In principle, all necessary logon data for a particular RFC destination (language, user, client, and password) are used when an RFC logs on to the target system.
    Typically the password field (for a particular user) must be maintained when an RFC communicates with other clients or user IDs.
    If one of the fields language, client or user is not maintained for the designated RFC destination, default values are taken from the system environment (system table).
    Tips:
    With RFC communication within a single R/3 system with the same client and user the logon fields do not have to be maintained. Password entry is also unnecessary in this special case.
    If an RFC logon in online mode is unsuccessful, an RFC logon window is displayed (not during background processing) where you can logon to the target system online at runtime.
    The default values for the RFC logon screen fields are as follows:
    Client
    The standard value of the target system application server is used. This value is read from the target server's "login/system_client" profile parameter.
    User
    The system inserts the user ID of the current user in this field.
    Language
    Information from the RFC destination is used to fill the language field. If the language field has not been maintained in the destination, the current language of the calling system is inserted.
    The RFC logon window does not appear if the initial function module call of the RFC destination originates from the system-specific function group 'SRFC'. The function modules RFC_PING and RFC_SYSTEM_INFO belong to this group among others.
    If you would like to have an RFC logon window displayed regardless, you must end RFC communication to that particular RFC destination after the call using the function module 'RFC_CONNECTION_CLOSE'.
    Be aware that no logon screen is usually offered when using trusted/trusting systems.
    Documentation to authorization checks in the RFC environment can be found in RFC authorization concept.
    Max

Maybe you are looking for