Broadcast and point to point server in the same port

I'm trying to set up a system where I can send point to point messages via sockets to certain ips, send broadcast messages to every pc in the network, and also be able to listen for point to point messages and broadcast messages, all in the same port. I've been able to establish a point to point connection using the Socket class to send the message, and using the ServerSocket class to listen for messages, but I can't seem to get broadcasting to work.
I read somewhere that for broadcasting one should use the DatagramSocket class. The problem is i'm not sure which ip i'm supposed to specify when I send the message. Also, do I need a special listener to listen for broadcast messages, or will the ServerSocket listener work for that?
This is what I have for the broadcasting part:
String msg = myId;
DatagramSocket sendSocket;
sendSocket = new DatagramSocket(Constants.COM_PORT); // 4567
InetAddress group = InetAddress.getByName(Constants.BROADCAST_ADDR); // "192.168.1.1"
DatagramPacket dp = new DatagramPacket(msg.getBytes(), msg.getBytes().length, group, Constants.COM_PORT);
sendSocket.send(dp);
sendSocket.close();
Thanks in advance
Diego

It worth mentioning that UDP/broadcast and robust do go together easily.
- UDP does not guarantee delivery. i.e. messages can be dropped and you won't be told. Lost packets are not retransmitted either.
- UDP can fragment packets if larger than 532 bytes long.
- UDP packets can arrive out of order (though I have never seen this myself)
If your receiver is under load/busy it can miss many packets if its buffers overflow.

Similar Messages

  • Netweaver administration and SAP Web Application Server r the same?

    Hi All,
    I am a Basis Consultant & new to Netweaver,..
    I am interested in Netweaver administration..
    1.I am confused wheather netweaver administration and SAP Web Application Server r the same?(or WAS is just another component of Netweaver).
    2.Do we need to administrate all the components of Netweaver(EP,BI,etc.,)seperately as an Netweaver Administrator?
    Thanks in Advance ,
    Malti

    Hi Malti,
    You must first download and read this document and then read 'help.sap.com' for what is netweaver.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e1515a37-0301-0010-b2bb-99780cb4cafa">Introduction to Web Application Server</a>
    The above mentioned document is a crisp guide to what is WAS.
    Further I got this from the sdn/netweaver webpage
    SAP NetWeaver is a web-based, open integration and application platform that serves as the foundation for enterprise service-oriented architecture (enterprise SOA) and allows the integration and alignment of people, information, and business processes across business and technology boundaries. It utilizes open standards to enable integration with information and applications from almost any source or technology. SAP NetWeaver is the foundation of SAP xApps and mySAP Business Suite solutions, and also powers partner solutions and customer custom-built applications.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/netweaver">SAP Netweaver SDN Page</a>
    You have lots of reading to do now.. hope that helps
    Regards,
    Siddhesh

  • Installing 2x Instances of UCM on the same ports on a multihomed server

    We're looking at installing 2x instances of UCM on the same multihomed server, using the same port numbers for each.
    But following the initial installation, we note that the admin port binds to all of the IP's in the server.
    $ netstat -a | grep LISTEN | grep 444
    tcp 0 0 *:4440 *:* LISTEN
    Is there a way to stop the Admin server from doing this, and only to bind to a single IP ?
    We effectively want to get the 1st instance Admin Server to Listen on IP1:4440
    And the 2nd instance Admin Server to Listen on IP2:4440
    Same with port 4444 for both instances.
    Incidentally, the Admin Server should not really listen on all IP's by default, as this is a potential security risk especially if one IP was for example internal traffic, and the other one was for external traffic.
    So there are other reasons for not wanting to listen on all IP's within the server rather than the specific one.
    Any help / guidance much appreciated.
    Regards
    Andrew

    This configuration entry is available:
    IdcServerBindAddress=IPaddress
    It's generally been used in clustered installations but I see no reason why it wouldn't work with a stand alone instance as well.
    Regards,
    Josh

  • Can you use the Airport Express A1264 as an AP and a DHCP server at the same time?

    Can you use the Airport Express A1264 as an Access Point and a DHCP server at the same time?
    I would like to use it as a DHCP server and AP at the same time in my LAN (no internet, just local machines through a few switches). I was lead to belive this could be the case from a few networking friends that haven't been friendly enough to help me out setting it up.

    I need it to act as a dLink/Cisco/Linksys/etc basic wifi router, in the fact that you can access it via wifi, and it will spit out DHCP addresses (192.168.1.xxx) to everything wired downstream of it.
    I want to simultaniously provide a Wifi connection and a LAN connection at the same time
    Thanks,
    BRad

  • How can I connect to Oracle and SQL server at the same time?

    I have been trying to find a way to connect to Oracle Database through the developer 2000 and SQL server at the same time. I need to return some data from Oracle Database and some from the Sql Server Database. And update both through SQL. I find there is such a thing as the Oracle Transparent Gateway for SQL server. I can't find it on any of my CD's or through OTN downloadable files. If anyone can point me where to get this. Or tell of another way this can be accomplished I would appreciate it. TIA.
    [email protected]

    I have been trying to find a way to connect to Oracle Database through the developer 2000 and SQL server at the same time. I need to return some data from Oracle Database and some from the Sql Server Database. And update both through SQL. I find there is such a thing as the Oracle Transparent Gateway for SQL server. I can't find it on any of my CD's or through OTN downloadable files. If anyone can point me where to get this. Or tell of another way this can be accomplished I would appreciate it. TIA.
    [email protected]
    As far as I know you have 3 options depending on your specifications. I don't think option #3 will work if you need to actually join a
    SQL Server table to an Oracle table.
    1. Oracle Transparent Gateway. I haven't used the Oracle Transparent Gateway but my understanding is that Oracle gateways are
    separate purchased products from Oracle. I've never seen any free/development versions of it anywhere. You'll need to contact
    your Oracle sales rep about it.
    2. Heterogeneous Connectivity. There's something called Heterogeneous Connectivity that could work for you - depends on what
    version of Oracle you're on and what OS. You basically set up an ODBC data source on the Oracle server and modify the listener.ora
    and tnsnames.ora files. You can then create a database link to SQL Server just like you would to any other Oracle database. You can
    check your Oracle documentation for how this works. There's also some very good documents on Metalink that tell you how to do this
    as well as a Heterogeneous Connectivity forum on this site.
    3. Use the exec_sql package available in Developer 2000. This allows you to open and execute cursors to remote databases within
    Developer. We have an account validation process that uses this - when a person enters an account number in a form while logged
    into Oracle it validates the account is valid in our main accounting DB2 database. We also pull HR information from DB2 into Oracle
    this way. If you're using Forms 6i exec_sql is a built-in command, in Forms 5.0 and 5.5 you have to add it as an attached library to
    the form. I think you also need the OCA options installed from the Developer software to have access to the library in Forms 5.0 and
    5.5. The library will be in the $ORACLE_HOME\oca20\plsqllib directory for these versions. The Developer documentation should have
    additional information.
    HTH

  • Use GPIP for measure six point by six DMM at the same time

    First Question
    I will use GPIB for measure six point by six DMM at the same time. I will record the data in every mins.Could it avaiable? Is this method not accuray?
    I aslo wanna to run 3 labview programme at the same. time.Each programme is same and use GPIB to measure by 2 DMM and 2 Digital In .Could i do this?

    The first question is easily handled by triggering all instruments at the same time and then querying each in turn for the measured value. You can use eaither a hardware or software trigger (i.e. the gpib GET command). For your second question, are these 3 LabVIEW programs started by a single main program? How you want to run them will make a difference but in any case, the programs will have to have some sort of synchronization mechanism if you want measurements to be taken at the same time or if independent, a blocking mechanism to prevent simultaneous reads and writes. More details on the second question would help.

  • How to show a picture both on client and server at the same time (X11?)

    Hi Guys
    I want show a picture on my client as well as on the server(in another location) at the same time, pretty much like showing something both on laptop and on a projector. Assume I have a picture sssss.jpg on the server A1, if I want to open that picture to my client, I can simply to do the following from client A2:
    xhost A1
    telnet to and login A1
    setenv DISPLAY "ipaddress of A2":0.0
    Anyone can direct me how to show picture the client that I am sitting at an also show on the server at the same time?
    Thanks

    VNC would let you do that. With a shared connection, both machines could run a VNC client to the same session.
    Darren

  • Can you run Embedded PL/SQL Gateway and Oracle HTTP Server at the same time

    Hi,
    I know this will sound a bit odd but their is a business case for asking this. Can you run APEX via the Embedded PL/SQL Gateway and the Oracle HTTP Server at the same time? Would their be any security/stability/etc issues I'd need to worry about? I know that I'll need to run them on different ports.
    Thank you,
    Martin Giffy D'Souza
    [http://apex-smb.blogspot.com/]

    I think I've done this in the past. Theres no technical reason why you can't do this as far as I know.
    I can't remember if I used different ports or same port.

  • Business One, Terminal Server, and SQL Server on the same machine

    Hi,
    We have a customer who has a machine with Win Server 2003 R2.  They are using it as a Terminal Server with Business One for multiple users and as a SQL Server.  The have memory leakage issues which they believe are caused by our add-on, which, when it fails, has over a gig of ram allocated to it.  Our add-on was created using VB .NET 2005 and should be able to depend on the GC to prevent memory leaks.  Is there something about this approach that is problematic?  Should they have SQL Server on one machine and terminal server with Business One on a different machine?
    Thanks,
    Mike

    we have many customers that have this situation. all on one server.
    the only thing that i recommend is that the server has POWER !
    4 Gigabyte RAM should be minimum and the server should have 2 quadcore processor. -> this results in 8 cores and enough power.
    regards
    David

  • Can BO XI and CE 10 be installed on the same server?

    We are preparing to upgrade our existing CE 10 to BO XI; however, we were unable to obtain a test server and will need to install it on the same server that CE 10 resides on (our development server).  I heard that both versions could not reside on the same server and I need this confirmed by a SME.  Thank you.  ~emoreno

    Tim,
    I'm not sure that my question was answered.  I just need to know whether CE10 and BO XI can be installed on the same server?  I have a development server (not a VM) with CE 10 and another customer wants to install BO XI on the same server.  I heard through other sources that BO XI and CE 10 cannot reside on the same server.  I need to know if this statement is accurate?  If BO XI cannot reside on the same server as CE 10, then our contracted vendor will have to provide t this customer with a different server.  I need this information confirmed in order to notify my management.
    Thanks...EMoreno

  • Strange problem with SQLPLUS when client and server on the same box

    Hi,
    I have the problem with SQLPLUS when clinet and server on the same machine.
    With client and server on the same machine i am running the command
    sqlplus -l username/password@connect_identifier as SYSDBA.
    With this command, even if you pass in wrong username or wrong password or both as wrong you can able to connect to database and execute queries.
    Once Connect_identifier is correct and trying to log in as SYSDBA ,sqlplus will log in to DB with any username and password.
    How to get rid of this behaviour. Is there any way to do this.
    I am running this command by creating a process in C#
    Edited by: user11000236 on Jun 16, 2009 10:31 AM

    user11000236 wrote:
    Thanks for the info.
    How does Oracle/SQLPLUS allows any username or password to log in to DB with SYSDBA Privillages? What is the concept behind this.?
    This is explainted in the above mentioned link:
    Operating system authentication takes precedence over password file authentication. If you meet the requirements for operating system authentication, then even if you use a password file, you will be authenticated by operating system authentication.

  • Can I do multiple installs on  one server at the same time ?

    Hi. we have a project where the basis group is under very tight deadlines. We are tasked with installing multiple SAP systems on the same server. Is it possible to install more than one SAP systems ( ie ERP, BI, EP, CRM ) on the same physical server at the same time. for example on analyst install ERP while at the same time another analyst do EP and so on....  Has anyone done that before and if so are there any issures. ( I put in a SAP note and got the response that this is not supported, but I just wanted to see if anyone had done it anyways )

    Hi Dan,
    Frankly simultaneous installations is not a great idea. There will be an enormous competition for resources. Then you also need to make available ports for carrying out the installations. Next it will involve high amount of coordination
    What of course is more reasonable is the idea of hosting more than one SAP instance on the same physical server though again harware is a very important concern. It includes your hard disk space,memory,CPU and other generic hardware.
    Please award points for useful answers.
    Regards.
    Ruchit.
    Message was edited by:
            Ruchit Khushu

  • Home Sharing not working between wireless PC's / devices and ethernet wired PC's on the same router.

    Home Sharing is not working between wireless PC's / devices and ethernet wired PC's on the same router.  I installed a new Verizon FIOS ActionTec  MI424WR GigE wireless / ethernet router, replacing the original FIOS router.  With the old router Home Sharing worked fine across and among all iOS and Windows wired and wireless devices.  With the new router Home Sharing works between and among the Wired PC's but not between the wired PC's and the Wireless connected PC's or iOS devices.  Home Sharing also works between and among the wireless connected PC's and iOS decices but not between them and the wired PC's.
    Only the router was changed.  No changes were made to any of the devices except all were updated with the latest version of iTunes 10.7.0.21 and the iSO devices were updated to iOS vrsion 6.01.  Three PC's are wired and all are running Windows 7.  There also is a Windows Home Server connected to the router by ethernet port.  It does not run iTunes but does provide WebDAV services to my iOS devices.  This works fine.  Two PC's are wireless, one running Windows 7 and one running Windows 8.  All of the PC's are connected to the same (new) router via it's ethernet ports and it's wireless access point.  Two of the wired PC's are connected via a high-speed  ethernet hup that is connected to the router (Home Sharing works fine between the two PC's on the hub and the PC on the router).  All wired and wireless devices on the router are visible and members of the router's Home/Office virtual network.
    All of the PC's are visible in the Windows network and all shared files are accessable from all PC's, both wired and wireless.
    Obviously the router seems to be the issue, something between the ethernet and the wireless access point components.  I checked the settings and found nothing that would prevent Home Sharing between the wired and wireless devices.  There is no setting that isolates the wireless network.  I have done the following:
    Read the router user manual and checked all the settings
    Rebooted the router and tested.
    Turned off the router's firewall and tested.
    Home Sharing is turned on all the devices and all use the same Apple ID.
    Restarted iTunes and tested.
    Verified iTunes is "Allowed" in each PC's firewall.
    Again, I can Home Share between the two wireless PC's but not between either of the wireless PC's and any of the wired PC's.  I can Home Share between my iPads and iPhones and either of the two wireless PC's but not with any of the wired PC's.  I can Home Share between any of the wired PC's but not between any wired PC and a wireless PC or iOS device.
    I hope someone may have had a similar problem and has a fix suggestion.  I'm stumped!  I have a;so contacked ActionTec and awaiting an answer.

    Solution from ActionTec is:
    Log into your router.
    Click the Advanced icon
    Cclick Yes
    Click on the IGMP Proxy
    Select Disable
    Click Apply

  • Is it possible to use both an ILB and an ELB (listening on the same port) in the same Azure cloud service?

    I'm building a test Lync deployment on Azure; yes, I know this is not supported, hence "test".
    Lync Front-End servers expose two set of web services, one for internal users and one for external ones; they listen on different ports (443 and 4443) on the same servers; when external services are published, you need a reverse proxy or a port forwarding
    in order to map port 443 of a public IP address to port 4443 of the Front-End server(s). When you have multiple Front-End servers in a pool, you also need to load-balance them.
    So, a typical Lync deployment looks like this:
           Internal users
                     |
                   443
                      |
              Internal LB
            192.168.0.20
            443         443
              |               |
       Lync FE 1     Lync FE 2
    192.168.0.21 192.168.0.22
              |               |
          4443        4443
              External LB
           Public IP Address
                     |
                  443
                     |
           External Users
    This should be easily replicated in Azure, as it supports both external load balancing and internal load balancing. They are even supported together in the same cloud service, so this configuration should be easy. However, it looks like "should"
    is the keyword here.
    After creating the external load balanced endpoint (which listens on external port 443 and forwards to port 4443 on the servers), I'm trying to create an internal load balancer and add internal endpoints to is; however, while the ILB can be created successfully,
    adding an internal endpoint listening on port 443 and forwarding to port 443 on the servers fails miserably, with an error stating that port 443 is already in use by another endpoint:
    Update-AzureVM : BadRequest : Port 443 is already in use by one of the endpoints in this deployment. Ensure that the port numbers are unique across endpoints within a deployment.
    For reference, my commands are:
    Add-AzureInternalLoadBalancer -InternalLoadBalancerName "LyncILB" -ServiceName "LyncFrontEnd" -SubnetName "LabSubnet" -StaticVNetIPAddress 192.168.0.20
    (This completes successfully)
    Get-AzureVM LYNCFE1 | Add-AzureEndpoint -Name "Https-Int" -Protocol "tcp" -LocalPort 443 -PublicPort 443 -LBSetName "HttpsIntLB" -DefaultProbe -InternalLoadBalancerName "LyncILB"
    (This fails)
    The existing external endpoint is configured as such:
    Get-AzureVM LYNCFE1 | get-azureendpoint
    LBSetName : HttpsExtLB
    LocalPort : 4443
    Name : HTTPS-Ext
    Port : 443
    Protocol : tcp
    Vip :
    ProbePath :
    ProbePort : 4443
    ProbeProtocol : tcp
    ProbeIntervalInSeconds : 15
    ProbeTimeoutInSeconds : 31
    EnableDirectServerReturn : False
    Acl : {}
    InternalLoadBalancerName :
    IdleTimeoutInMinutes :
    LoadBalancerDistribution :
    The error doesn't even make a lot of sense; the external load balancer listens on a public IP address, while the internal load balancer listens on a private IP address in the internal network; there
    shouldn't be any conflict here... however it looks like there is one instead.
    Why doesn't this work? Am I doing something wrong, or is Azure networking just being silly as usual again?

    Hello Massimo Pascucci,
    The issue that you are facing when creating an endpoint with internal loadbalancer is the limitation of not allowing same ports to be listening under a single cloud service. This reason for this is that there is a limitation of only one private IP (Also
    known as the Internal load balanced IP) per cloud service.
    There is also a limitation on the Internal load balancer more than one port to be published per load balancer:
    You can leave your feedback by following the link below:
    https://social.msdn.microsoft.com/Forums/en-US/1805c5a0-3906-4cd6-8561-9802d77e0ae5/is-it-possible-to-use-both-an-ilb-and-an-elb-listening-on-the-same-port-in-the-same-azure-cloud?forum=WAVirtualMachinesVirtualNetwork
    Refer to this article for more information on Internal load balancer:
    http://azure.microsoft.com/blog/2014/05/20/internal-load-balancing/
    Thanks,
    Syed Irfan Hussain

  • HT204053 Me and my daughter had been using the same apple id, she was triyng to change it now all of my iphone contact are gone, what can i do ti get it back , this is very important to me.

    Me and my daughter had been using the same apple id, she was triyng to change it, now all of my iphone contact are gone, what can i do ti get it back , this is very important to me.

    Your contacts are helpd on the server, so if you sign out from your iCloud account and sign into another one they will disappear. If you sign back into the original account they will reappear.

Maybe you are looking for

  • Harware Setup Opinion Solicitation

    Ok guys, wanted to get everyone's opinion on basically how I should set up my hard disks.  Here's my complete system breakdown. Haswell 4770 Nvidia 760 with 4Gb MOBO: asrock pro3 z87 32 gigs ram @ 1866mhz Samsung EVO 120gb PNY XLR8 240gb Seagate Barr

  • SalesForce to XI

    Hi I wanted to know if any1 did an interface between SAP XI and SalesForce.com ( Web Based Crm ) if u have any relevant information/web logs it would b gr8 thx,     Shai

  • Visibility of Topics in RoboHelp8

    Within RoboHelp 8, is there a way you can create topics which can be searchable but are not displayed in the TOC when published? If so, how can this best be achieved please? Kind Regards, Campbell D.T. Craig Interactive Media Developer and Instructio

  • Click on button progrmaticly

    Is it possible to write code that will cause a button to click programmatically instead of manually clicking the button.I have a process that runs when a button is clicked, but I don't want the user to have to click on the button. I want to fire the

  • Captivate 5 not rendering large exe files properly

    Have imported large swf files into Captivate % (with seperate .wav files for audio). They all synch on the timeline at 24fps. for each slide. They look great in preview and when published to .exe they look fine on some computers. But we have encounte