Socket for both broadcast and receive?

Hi all,
The server need to broadcast an inviting message continuosly. and at the same time the socket is able to receive any messages from the client.
I use 2 threads. One iniiated with Socket for listening and the other multicast socket with datagram. However, I don't think I did it the right way?
one thread: skt = new ServerSocket(4446);
broadcast thread:
MulticastSocket socket = new MulticastSocket(4446);
InetAddress address = InetAddress.getByName("230.0.0.1");
     socket.joinGroup(address);
DatagramPacket packet;
With this, how can the client receive and send at the same time?
Any souce code for server and client?
any documents, url?
thanks
andrew

ServerSockets go with MulticastSockets like baloney and whip cream.
ServerSockets are for connection-based sockets.
MulticastSockets are for connection-less datagram sockets
Pick one type based on your requirements and stick with it.
Either ServerSockets and Sockets
or MulticastSocket with MulticastSocket.

Similar Messages

  • Receiving error msg in user's mailbox for both Outbound and Inbound IDocs

    Hi,
    Whenever specific IDoc (Inbound/Outbound) gets failed then the user/org unit assigned in its partner profile should get those error messages in their inbox.
    To achieve this for Inbound Idoc I have performed following set of steps:-
    1. Created an object and attached it under IDOCAPPL using 'SWO1' and I have set that object type as 'To imported'.
    2. I have assigned that object type to event 'ERRORINPUTOCCURRED' and standard tasks '00008068' (Inbound processing error), '00008074'
    (Inbound Syntax error), '20000051' (IDoc Application Inbound error), '300000207' (Error during Inbound processing of SYSTAT01) using transaction 'SWETYPV'.
    3. I have created an organisation unit with two positions and different jobs where each job has been assigned to specific tasks. User has also been assigned to specific jobs.
    4. At the end of this I have assigned this org. unit to IDoc's partner profile.
    But this process does not seem to be working we are not receiving any mail in agent's inbox. If someone has done similar kind of thing in past, please let me know the correct step for both Outbound and Inboud IDoc.
    Thanks in advance.
    Supriya

    Hi,
    Try this for inbound IDOC
    Go to transaction WE42
    Give the process code that you gave in the partner profile (WE20)
    Select that row and press the details button (F2).
    Next to the "Identification"  field there will be push button which has the tool tip "ALE table"
    Press that button
    In the resulting screen..
    In the IDOC section..
    Give the following..
    object type -  "new business object that you created"
    Start event - INPUTERROROCCURRED
    End event - INPUTFINISHED
    Hope this works..
    Thanks,
    Naren

  • Is there a way for all attachments to be 'viewed as icon' both sending and receiving?

    In Mail for Mac OSX 10.9, is there a way for all attachments to be 'viewed as icon' both sending and receiving?

    Not sure if this still works with Mavericks, but in Terminal try:
         defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

  • My apple TV is connected to a DTV with an HDMI cable and to my Yamaha receiver via optic cable. We rented a movie on Apple TV and.found that the movie played, but we only got audio for music tracks. Voice tracks were silent using both TV and receiver.

    My apple TV is connected to a DTV with an HDMI cable and to my Yamaha receiver via optic cable. We rented a movie on Apple TV and.found that the movie played, but we only got audio for music tracks. Voice tracks were silent using both TV and receiver.  This only occurred on the rented video and on recorded shows on my cable DVR. previews and other content on Apple TV are fine. Any ideas??

    Previews and trailers do not contain 5.1 audio.
    If you have recently moved your setup, you may have inadvertently changed some of the settings on your receiver. It certainly sounds as though it is unable to play the 5.1 audio from the Apple TV.

  • On my ipad mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server.

    On my iPad Mini, when I delete an email from the inbox (and it goes into Trash), it immediately deletes that email from the server (ATT/Yahoo).  I've called support for both ATT and Apple and can't find a way to have the emails remain on the server. 
    My husband and I share an email address and if he misses a day checking email on his notebook, he doesn't receive the items that I have sent to Trash on my iPad Mini.
    Appreciate suggestions.
    [The curious thing is, if I "move" the deleted emails from Trash on my iPad Mini into the Inbox, I can go to my notebook, open my online email and they are back in my ATT/Yahoo Inbox.]

    Is your Yahoo account set up as POP3 or IMAP?

  • I have just bought a new iPhone and gave my old one to my Mum. My problem is that even with a new SIM and phone number I seem to be getting her messages as well as mine on my thread. They are also being recorded as both sent and received so she must be pa

    I have just bought a new iPhone and gave my old one to my Mum. My problem is that even with a new SIM and phone number I seem to be getting her messages as well as mine on my thread. They are also being recorded as both sent and received so she must be paying twice for each SMS sent. Help please

    Wipe iPhone/iPad/iPod touch clean
    There are a few steps to do:
    Switch off iMessage in Settings > Messages
    Switch off FaceTime in Settings > FaceTime (iPod touch 4th Generation or later, iPhone 4 or later and iPad 2 or later)
    Delete iCloud in Settings > iCloud > Delete Account
    Finally Settings > General > Reset > Erase All Content and Settings.
    Un-register your device: https://supportprofile.apple.com
    Now you can sell/give.
    Now, you should get her a new Apple ID to sign in the options above.

  • BPM when both sender and receiver systems are Sync. Please help!

    Hi Experts,
       I want to use BPM when both sender and receiver systems are Sync. For example: web service ---> RFC
    I have tried the solution as given in the blog
    https://weblogs.sdn.sap.com/pub/u/39730 [original link is broken] [original link is broken]
    but it does not work. I am getting Time Out error.
    Can somebody tell me the correct way of configuring BPM for sync-sync scenario?
    Kindly give the integraion directory steps also.
    Thanks
    Gopal

    Hi Hemant,
       I have already tried the solution as given in the blog (https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1403 [original link is broken] [original link is broken] [original link is broken])but it does not work. When I run the scenario I am getting Time out error.
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Timeout condition of pipeline reached</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Please help!
    Thanks & Regards,
    Gopal

  • I have partitioned my time capsule, but I can't get it to work as a Time Machine back up and permanent media server for both mac and PC. What format do I need to partition the drive to so that it works for both mac and windows and so that it will be visab

    I have partitioned my time capsule, as I want part of it to act as a media server for both mac and windows. However I don't know what format that I need to partition it to. I also can't make it a permanently accesible drive. I want to restore the drive to the original format (which I don't know) and start again and re-partition the drive in a format that can be used for media by both mac and PC and for time machine back-ups and make the media part of it permanetly accesible so I can add and acccess my files.
    Thanks

    You are mixing up a couple of things here.
    The TC drive cannot be partitioned without removing it.. did you do that?
    If you partition it you must use a Mac disk utility and use the HFS+ ie standard Mac format. And GUID partition table not windows type.
    You can select erase disk in the airport utility.. that will take the disk back to original format. No partitions. TC is deliberately not partitioned as it is not a media server.. it is a backup device for TM. Over time .. the disk will be filled with TM backups so you have a long history of file changes to your computer.
    There is no media server in the TC.. it is merely disk storage.. you can serve files from it to a media device.. but the TC itself is dumb as dumb.
    Now the actual format of the drive is irrelevant to the PC.. The TC offers SMB file services to the network. You can copy files to and from the TC as if it was a local disk without caring one iota about the format. The TC handles that .. it is not a local disk .. it is a network drive.
    Although you cannot partition the TC. you can still copy files to it.. this does have implications for TM.. but as long as there is plenty of free space should not be a major issue.
    You can create a disk image via the disk utility in a Mac.. and as stated you can create partitions if you do it on a Mac with the disk directly connected which means breaking warranty if any exists on the TC.

  • I have Photoshop Elements 12 for both PC and Mac (I use both). I have a new camera, Nikon D810. I downloaded the latest version of Camera Raw, 8.8. My D810 is listed as a supported camera model. However, when I try to open a raw photo in Photoshop Element

    I have Photoshop Elements 12 for both PC and Mac (I use both). I have a new camera, Nikon D810. I downloaded the latest version of Camera Raw, 8.8. My D810 is listed as a supported camera model. However, when I try to open a raw photo in Photoshop Elements, I keep getting the message "Could not complete your request because the file appears to be from a camera model which is not supported by the installed version of Camera Raw. I have tried reinstalling Camera Raw many times, and have tried to open many different raw files in Elements, and still get the same error message. Please help.

    How did you try to install ACR 8.8.  The only way I know of that works with Elements is to use the Updates Choice on the Help menu.
    There are two charts supplied by Adobe that explain your RAW dilemma.  This one tells you what your camera needs:  http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html   This one tells you what version of software you need:  http://helpx.adobe.com/x-productkb/global/camera-raw-compatible-applications.html
    In your case, the Nikon D810 needs Adobe Camera Raw (ACR) 8.6 or Lightroom 5.6.  (Congratulations on buying a new camera!)
    To get to that level with Photoshop Elements, you will need to replace your Photoshop Elements 12 with version 13.   Adobe caps ACR updates on version 12 at 8.5.
    The most convenient way to get around it without spending any money is to use the FREE from Adobe DNG Converter.  Download and install it from here for FREE:  http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=5855&fileID=5890  Once it is installed you can convert your D810 raw files to an Adobe RAW version with the .DNG file extension that most, if not all, versions of the various Adobe software programs can use.  That includes old versions of Photoshop, Elements and Lightroom.  DNG converter can be used as the tool to move your files from your memory card to your computer, is efficient, will convert in batches and is completely lossless.  There is no risk of any image quality degradation or RAW functionality.

  • HT4314 I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    I have a iPad and iPhone with the same Apple ID, but on Game Center I have used the same id for both devices and they are two different profiles and I was wondering how to have one of the accounts on both devices.

    Hi Jamesdwills,
    Welcome to the Support Communities!
    If you are using the same Apple ID on both devices, the Game Center profile should be the same.
    Check out this information from the iPad User Guide.  Try signing out of the Game Center on both devices and then sign back in with the correct Apple ID:
    Using Game Center
    http://support.apple.com/kb/ht4314
    Game Center settings - iPad User Guide
    http://help.apple.com/ipad/7/#/iPad9a13d039
    Game Center settings
    Go to Settings > Game Center, where you can:
    Sign out (tap your Apple ID)
    Allow invites
    Let nearby players find you
    Edit your Game Center profile (tap your nickname)
    Get friend recommendations from Contacts or Facebook
    Specify which notifications you want for Game Center. Go to Settings > Notifications > Game Center. If Game Center doesn’t appear, turn on Notifications.
    Change restrictions for Game Center. Go to Settings > General > Restrictions.
    Cheers,
    - Judy

  • We have 3 devices used by 3 different people under the same Apple ID, how do I stop getting my daughters texts, both sent and received?

    We have 3 devices used by 3 different people under the same Apple ID, how do I stop receiving my daughters texts? Both sent and received.

    When you use the same Apple ID on 3 devices it means you are all using the same (email, imessaging, calendar etc).  Since iCloud (MobileMe) is designed to be shared across all devices included Macs, it means all devices setup with the same ID will have access to the information.
    Text messaging is relevant only to the number you are texting.  This is done through your telecom companys lines and not on Apples.
    If you do not want to have others be able to read any of your information then it is best you each have your own account.

  • I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.

    I recently purchase an ipad2.  I also have a mac laptop.  Now, when I facetime call using my iphone to my ipad2 or mac, it states busy.  how can i fix this problem?  I have the same apple id e mail for both ipad2 and mac.  it might be getting confuse now.  I want to be able to face time also using my ipad2 to my laptop especially if one of the members of the family is traveling.  Thanks.

    thanks.  your answer was correct, clearer.  I have another question, maybe you can answer.  I just purchase my ipad2 2 days ago.  yesterday, there was a sound.  today there is no sound.  there is a sound only in movies and you tube and music.  but no sound on all apps and keyboards.  I look it up and seems like ther are few that have this problem.  I called walmart coz I bought it there and they told me that they have not heard that before but if I can't fix it, just return it and exchange it with anew one since I have 14 days to do that.  I tried rebooting it and still won't work.  Should I just restore it?

  • I have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    i have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

  • Hi, I have apple account/password on laptop but can't use the same ID etc on new Ipad.  On my account it says ID is only for 1 system.  I really want only one ID for both Ipad and laptop. Thanks

    Hi,
    I have apple account/password on laptop but can't use the same ID etc on new Ipad.  On my account it says ID is only for 1 system.  I really want only one ID for both Ipad and laptop.
    Thanks

    It seems that you have used the AppleIDs to "Purchase" your devices, which marries the two for all time and eternity.
    For info - Using your Apple ID for Apple services
    For Account security issues - Apple ID: Contacting Apple for help with Apple ID account security
    regards
    CCC

  • How can I sync my photo contents in iPhoto on my iMac to my new iPAD's iPhoto?  I follwed all the instructions on manuals for both iPAD and iTunes re syncing, but I cannot find "phone button" under Device name on iTunes page. Please help!  Thanks!

    I follwed all the instructions on manuals for both iPAD and iTunes re syncing, but after physically connecting iPAD with iMac with USB or via WiFi I still cannot find "phone button" under Device name on iTunes page. Please help!  Thanks!
    I have been creating a photo book using a lots of photographs on iPhoto, and then I took another photos by using new iPAD which I want to integrate with the original album/book on iMac. I was able to import them from iPAD's iPhoto to iMac's iPhoto.  However I cannot import or transfer or sync anything from iMac's iPhoto to that of my iPAD. 
    So my iPhoto page on iPAD contains only 3 or 4 newly created albums, and no other info.  That means no syncing....
    I am supposed to be able to work on this project on either of these iPAD and iMac, correct?
    I am puzzled.  I appreciate for your advice and help.
    Thank you!

    It doesn't appear under the iPad device on the left-hand sidebar of iTunes, you need to select the iPad device on the sidebar and then select the Photos tab on the right-hand side of iTunes e.g.
    And then on the right-hand side :

Maybe you are looking for