Can i run UDP  client and UDP  server socket program in the same pc ?

hi all.
when i execute my UDP client socket program and UDP server socket program in the same pc ,
It's will shown the error msg :
"Address already in use: Cannot bind"
but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
anybody know what's going on ?
any help will be appreciated !

bobby92 wrote:
i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
The server should be using that constructor, the client should not be specifying a port.
so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

Similar Messages

  • When I use a projector via a VGA adapter I can not run my Bluetooth speaker or other Bluetooth devices at the same time. Can anyone help me with this?

    I try to find help. I can not run a projector and a Bluetooth device at the same time. Even though my Bluetooth speaker is recognized, and I have changed the settings to this speaker, it wont play any sound. I have got also problems using other Bluetooth devices when I use the projector via a VGA adapter.

    I try to find help. I can not run a projector and a Bluetooth device at the same time. Even though my Bluetooth speaker is recognized, and I have changed the settings to this speaker, it wont play any sound. I have got also problems using other Bluetooth devices when I use the projector via a VGA adapter.

  • Can you run Lion os and Lion Server os on the same Mac mini?

    I'm a windows convert to Mac and I'm interested in running a standard Lion Client, but at the same time running Lion Server on the same Mac Mini (Server Edition).  My needs for the Lion Server OS is to handle e-mail, a Web Site, and file sharing between the server to a secondary PC, iPad, and iPhone.  But at the same time I wish to dive into the Mac (Apple) experience.  I just wish to be able to do this on the same machine.
    As a secondary question, is it possible to merge two different iTune Accounts into one?  Is it possible to share items purchased on one iTunes account with an iPad that is tied to a different iTunes Account?

    1. Yes, but you'll need separate partitions for each OS, or run the client OS in emulation.
    2. It isn't possible to combine the accounts, but a single iTunes library can contain content from multiple iTunes Store accounts.
    (61769)

  • Should i create a client and a server socket in a same application

    Greetings,
    In which situation sould i have a server socket ? and in which situation should i have a client socket ?and in which situation should i have both?
    I 'm making a app. who receives info (like alarms ) from a automation machine and also that same app. as a scheduler who send commands according to dates to the automation machine.
    Now the automation machine is programmed like a socket tcp/ip server who is always on and the app. is a client.
    Every time there's an alarm the machine sends me the info and i put it in a mysql database.
    Every time there's an event programmed the app. sends a string to the machine.
    The question is that i can't maintain that socket always connected, Sometimes disconnets.
    I was thinking of making the change of creating in both sides a server and a client, so that, for example, in the app. the client woul d handle the event msgs and the server would accecpt connections with alarms from the automaition machine.
    Since i'm a newbie in Java could somebody give me some tips, please?
    Thanks

    Thanks Peter....
    But i already do that....
    I have a thread who handles the connection management.
    If by some reaseon the connection is lost the thread reconnects it.
    My problem is that sometimes it reconnects every second, and i loose info provided by the automatian machine.
    The best thing to have it would be a socket listener, but Java does have any.
    Is there any API that does a socket listener?

  • Can BO 5.1.8 and BOXI R2 be installed on the same server?

    Hi guys,
    Does anyone know if BO 5.1.6 and BOXI R2 can be installed on the same server, provided that the hardware is sized to cope with both environments?

    Fernando,
    Business Objects does not recommend that two different versions of our software be installed on the same server.
    Thanks,

  • Window SBS server 2008 and window server 2008 R2 on the same domain

    Hi all,
    I am a person only work for linux system. Recently i work for my company that using microsoft technologie. So i have a lot of trouble. Could you please help me and below are my big troble that i have met:
    In my system, i have the first window SBS server 2008 run on our domain. However my organization growth up and we have more than 150 users and mailbox of exchange server 2007. So i do not want to use my sbs server 2008 anymore.
    I am going to install a window server 2008 R2 64 bit and join it into the same domain with sbs server 2008. It will be replicate the username, dns, OU and group policy...After that i will tranfer FSMO role to new server and i will demote then remove the
    sbs server.
    My boss say that i should not use this solution because window server sbs can not run with any other kinds of window server 2008 (R2, standard, enterprise...) and it will automatically shutdown the main server after a couple of days.
    Someone have experience can help me. I am so confuse now

    Maybe this will also help to better understand the steps involved:
    Transition from Small Business Server to Standard Windows Server
    http://blogs.technet.com/b/infratalks/archive/2012/09/07/transition-from-small-business-server-to-standard-windows-server.aspx
    Migrating away from SBS 2011
    http://social.technet.microsoft.com/Forums/en-US/07c58cc4-7d6d-419a-b1a0-439c2cc0c48d/migrating-away-from-sbs-2011?forum=smallbusinessserver
    Migrating from SBS 2008 to Windows Server 2012 R2 (NOT Essentials and with NO Exchange)
    http://social.technet.microsoft.com/Forums/en-US/1276d2d3-a8f2-4786-82f3-4308a2affb11/migrating-from-sbs-2008-to-windows-server-2012-r2-not-essentials-and-with-no-exchange?forum=smallbusinessserver
    And remember, as long as you don't move the PDC to one of the new DCs, you can leave the SBS 2008 up indefinitely. But I would remove Exchange 2007 off it right away once I've migrated the mailboxes and public folders, otherwise
    you will get yourself into an Exchange coexistence scenario which is much more complex to configure and support because of the CAS differences, changing the URLs on the old one to "legacy.domain.com," getting a new UC/SAN cert with the correct
    names on it, and more. Believe me, you really don't want to coexist them. The only time I've coexisted Exchange versions is during large migrations, such as 500 or more. Otherwise, I just migrate the mailboxes over a weekend and get it done with.
    Ace Fekay
    MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.

  • Can we use both 0FI_AP_3 and 0FI_AP_4 for Delta Loads at the same time.....

    Hi Gurus:
    Currently my company uses 0FI_AP_3 for some A/P reporting. It has been heavily customized & uses Delta loading. However, SAP recommends the use of "0FI_AP_4" for A/P data fro delta loads. I was able to Activate 0FI_AP_4 as well & do some Full Loads in Dev/Test boxes. Question is whether I can use both the extractors for "Delta" loads at the same time......? If there are any issue, what is the issue and how ccan I resolve it? Is the use of only one extractor recommended......??
    Please let me know as this impacts a lot of my development....! Thanks....
    Best...... ShruMaa
    PS:  I had posted this in "BI Extractors" forum but there has been no response......  Hope to get some response.......!  Thanks

    Hi,
    I would recommend you to use 0FI_AP_4 rather using both, particularly for many reasons -
    1. DS: 0FI_AP_4  replaces DataSource 0FI_AP_3 and still uses the same extraction structure. For more details refer to the OSS note 410797.
    2. You can run the 0FI_AP_4 independent of any other FI datasources like 0FI_AR_4 and 0FI_GL_4 or even 0FI_GL_14. For more details refer to the OSS note: 551044.
    3. Map the 0FI_AP_4 to DSO: 0FIAP_O03 (or create a Z one as per your requirement).
    4. Load the same to a InfoCube (0FIAP_C03).
    Hope this helps.
    Thanks.
    Nazeer

  • Can't connect to Internet and 192.168.1 network at the same time

    I have been having an issue with my MacBook's networking for the past 4 months. Here are the specifics:
    *My MacBook is connected to the Internet via a linux router, with an address in the 192.168.1.x address space. DNS server is an openDns server, 208.67.222.222
    *My MacBook is assigned an IP Address manually in the 192.168.1.x namespace
    *I have a printer manually assigned an address in the 192.168.1.x namespace
    Problem:
    * I can only connect to my printer if I leave my DNS server entry blank under my Airport TCP/IP configuration
    * I can only connect to the Internet when my DNS server entry to set to the openDNS server entry.
    Question:
    Is there any way I can connect to both my local network printer and the Internet at the same time? I have set up two locations that I can switch between, but I would prefer to be able to access both networks at once.

    I tried turning AppleTalk on, but no luck.
    It seems that the problem is related to basic TCP/IP connectivity. For example, when my DNS server is set to blank, I get a fine response from the command "ping 192.168.1.253". However, when my DNS is set to one of the openDNS servers, I get this error:
    PING 192.168.1.253 (192.168.1.253): 56 data bytes
    ping: sendto: No route to host
    ping: sendto: Host is down

  • Use TC as a wireless client and as ethernet switch hub at the same time?

    Hi!
    I have a wireless DSL-modem downstairs and my office upstairs. Since I use the TC-USB Port for my printer (to share it to my family as well) my TC is located in the office, close to the printer. Thus TC has to be configured as a wireless client and everything works fine so far,........but: When I add music (stored on TC) to my iTunes library, everything is soooo sloooow! Copying files using the route iMAC ---> DSL-modem/router ----> TC .... so sloooooow!
    Is there any way to use the ethernet ports while TC is a wireless client?
    Whenever I connect my iMac via ethernet using my current setup, it doesn't get an IP address from TC (obviously because there is no DHCP service active???). When I disable my Airport on the iMac, all connections are off-line.
    Pls. help or advise!
    Thx. Hannes

    Thanks for the response.
    Everything works fine if I use your suggested setup but I need the TC in the office, and the DSL modem downstairs. An ethernet connection is not possible this way, and the printer in the living room isn't really a nice piece of furniture
    I think, there is no possibility to use the wireless as uplink and the TC as a router/DHCP-server...
    Probably I need a server computer to handle the connection between the wireless LAN created by the DSL modem and an ethernet network managed by the TC.
    Hopefully someone has an idea/solution that fixes my problem.
    meanwhile I keep looking......

  • Can I use both ePrint and AirPrint on an HP4630 at the same time

    I have an HP4630 printer that I wish to use with an iPad and Mac Notebook (PowerPC running OS X 10.5.8) and want to know if I can run AirPrint for iPad and ePrint for Mac Notebook at the sametime.
    I understand that Mac Notebook can not connect to the printer over the network because it is not capable of running OS X 10.6 and above.
    I appreciate your help.
    This question was solved.
    View Solution.

    Hello Chesher5,
    Welcome to the HP Support Forums!
    Regarding the inquiry into ePrint and AirPrint for the Officejet 4630, yes they can be both used at the same time. They are completely separate means of printing. Both require a network connection though.
    If you have any problems setting up or using either, please let me know and I'll do my best to assist.
    Cheers,
    JERENDS
    I work on behalf of HP
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to the left of the reply button to say “Thanks” for helping!

  • Apple TV - can I pair my macbook and my wife's macbook at the same time with different itunes accounts?

    Just bought the Apple TV2 yesteday.
    I'd like to pair both my macbook and my wifes macbook to the Apple TV.  We both have seperate iTunes accounts.
    Is this possible without having to sign on or the other out of apple TV?

    Welcome to the Apple Community.
    Yes you can do that. The key to this is remembering your homesharing ID and your iTunes account ID are not the same thing (although you can use your account details for your homesharing details)
    Set up homesharing in both instances of iTunes using the same information in each, your Apple TV will then see both libraries.

  • Running SUN JRE and Microsoft VM in InternetExplorer on the same machine

    Our product needs at least Java 1.3 to run.
    One of our customers needs to run old applets which for some reason I don't know need the microsoft VM.
    Is there a way to install/run both VMs on the same machine?
    Udo

    Can they be installed - yes.
    But your code will not run in the MS VM. And if their applets won't run in your VM that means there will be two VMs running as two separate processes. So the applets will not be interacting with your code directly.

  • Run DW CS4 and DW CS5.5 update on the same machine?

    Is it possible to run DW CS4 and DW CS 5.5 (as an update of the DW CS 4) on the same machine? Due to the fact that ADDT doesn't exist anymore and we still have some projects needed to be maintained on ADDT, DW CS 4 should still be usable on the same Mac.

    Yes, each upgrade installs into its own folder.
    Just don't try and run them at the same time.
    Many people keep half a dozen versions (upgrades of each other) on their hard drive since hard drives are so spacious these days.

  • Can I get my wife and my phones to synch to the same iMac, but have different address books - when synching we keep ending up with all the contacts on both phones...

    Can I synch 2 phones to the same iMac, but have different address books?

    If you and your wife have separate user accounts on the Mac, then each of you will have separate libraries to sync. You can them maintain separate address books, calendars, apps, etc.

  • HT201933 How can I use my trackpad and my Apple Magic Mouse at the same time? If I don't have my mouse with me I can't use my laptop. The trackpad only moves an arrow around but doesn't let me click on anything?

    When I want to use only my laptop without the apple magic mouse, how do I disable the mouse so that the trackpad works?

    Hi, thanks for your answer,
    No, I connected the midi-in from the blofeld to midi-out from the virus. I was told to do so by the guy who sold me the ultralite mk3.
    I made some tests before getting the ultralite... I used the Virus soundcard as audio device and I could control the blofeld. But I had to link my monitor to the Blofed Out... then I wasn't able to listent to the Virus. But this way I could play the Blofeld in Logic (but couldn't see any midi data and when I bounced I had no sound)
    That's the main reason I decided to buy an external audio device (to be able to play both the Virus and the Blofeld)
    But I think the way I connected Blofeld to Virus is right because I can see the light which means it receives midi data.
    I think it's more about how to set it within logic...
    And the Blofeld only gets one Midi connection: Midi In
    Both my Virus and Blofeld are also connected to my MacPro via USB, that's the reason I didn't connect the synths to the ultralite via midi...
    thanks for you help! I'm getting crazy lol

Maybe you are looking for