Problem socket.bind() with multiple modems and multiple IPs

I've connected 2 or more modems in Windows control panel and made up windows dail ups. Then I dail up each modem and obtain the local DHCP IPs of each modem.
My target is : to set up sockets using separate modems.
the code is like: create a socket instance , and use Socket.bind()method to bind the socket to a specified modem's local IP , then do socket.connect().
but the problem is : although there are several modem dail ups and at the same time I bind each socket to different IPs , the program always connect via the first modem dailed up.
Does Socket.bind() method really bind the socket connection to the IP's or hardwares?

I think you are trying to use a Socket where you want a ServerSocket to accept the incoming connection. Check this out (I have underlined what
should interest you):
public ServerSocket(int port, int queueLength) throws IOException, BindException
This constructor creates a ServerSocket on the specified port with a queue length of your choosing. If the machine has multiple network interfaces or IP addresses, then it listens on this port on all those interfaces and IP addresses. The queueLength argument sets the length of the queue for incoming connection requests--that is, how many incoming connections can be stored at one time before the host starts refusing connections. Some operating systems have a maximum queue length, typically five. If you try to expand the queue past that maximum number, the maximum queue length is used instead. If you pass 0 for the port number, the system selects an available port.
For example, to create a server socket on port 5,776 that would hold up to 100 incoming connection requests in the queue, you would write:
try {
  ServerSocket httpd = new ServerSocket(5776, 100);
catch (IOException e) {
  System.err.println(e);
}The constructor throws an IOException (specifically, a BindException) if the socket cannot be created and bound to the requested port. An IOException when creating a ServerSocket almost always means one of two things. Either the specified port is already in use, or you do not have root privileges on Unix and you're trying to connect to a port from 1 to 1,023.
So once you receive a connection, it looks like it is up to you parse any
relevant info you want out of the Socket you get from ServerSocket.accept();
-Cludge

Similar Messages

  • I have one PC with a modem and linksys router #BEFW11S4 i...

    I have one PC with a modem and linksys router #BEFW11S4 installed. I have 3 other PC's which connect to it via Linksys wireless-G adapters. Things have been working just fine until recently when now at least twice a day my Pc's with the adapters lose connection with the router. Any suggestions?

    Open routers set up page ..... click status & see the firmware version ...... if required update ....download the latest firmware from http://www.linksys.com/download ........

  • Problem in Multisim with transient analysis and initial conditions

    Hello everyone,
    I have a problem in multisim with transient analysis and initial conditions.
    If I do transient analysis with automatically determined initial conditions the circuits works.
    If I do transient analysis with user-defined initial conditions the circuits works in cases.
    --Working with user-defined---
    *## Multisim Component V2 ##*
    vV2 3 0 pwl(0 0 0.001 0 {0.001+1e-008} 3 {0.001+1e-008+1} 3)
    *## Multisim Component R1 ##*
    rR1 3 0 10000 vresR1
    .model vresR1 r( )
    --Working with user-defined----------
    *## Multisim Component V2 ##*
    vV2 1 0 pwl(0 0 0.001 0 {0.001+1e-008} 3 {0.001+1e-008+1} 3)
    *## Multisim Component U1 ##*
    xU1 1 0 MEMRISTOR__MEMS__1__1
    --Not Working with user-defined-------
    *## Multisim Component V2 ##*
    vV2 3 0 pwl(0 0 0.001 0 {0.001+1e-008} 3 {0.001+1e-008+1} -3)
    *## Multisim Component R1 ##*
    rR1 3 1 10000 vresR1
    .model vresR1 r( )
    *## Multisim Component U1 ##*
    xU1 1 0 MEMRISTOR__MEMS__1__1
    The costum component includes something like that:
    .subckt MEMRISTOR__MEMS__1__1 plus minus PARAMS:
    *Parameters values
    +rmin=100 rmax=390 rinit=390 alpha=1E3 beta=0 gamma=0.1 VtR=1.5 VtL=-1.5 yo=0.0001
    +m=82 fo=310 Lo=5
    blah blah ...
    .ends Memristor
    Namely, if I combine the resistor and my custom component in one circuit, transient analysis with user defined initial conditions gives an error (timestep too small).

    Hi  Nik,
    If possible, please post the Multisim file. This way, I can get access to all your settings.
    Tien P.
    National Instruments

  • Problem Creating PDF with Multiple Files in Pro. 7

    I'm using Adobe Acrobat Professional 7 on a computer with Windows XP.
    The problem is that when I try to create a PDF with multiple files everything just suddenly stops. There are 75 files involved and when it gets to around 41 or so (don't know the exact number because I turned away from my computer for just a moment), it just stops. There are no error messages; nothing. Just a blank Acrobat screen.
    Last week I had a different problem which was resolved by an uninstall/reinstall and I was able to create the PDF with those exact same 75 files, but after the PDF was created I realised that some changes needed to be made. I dumped the PDF, made the appropriate changes and left it for the weekend. Today I the new problem has arisen.
    Any ideas what the problem might be?

    I've read many discussions about Acrobat and problems with server files, with the general solution being what you are doing... copy the files to a local hard drive

  • Data binding with Multiple Filter

    Hi Experts,
    I am trying to do the data binding using filters with multiple values.
    ex: I am selecting the multiple values from list dialog and those i want to pass to odata service as a filters.
    name : abc
                   pqr
    I am looping on above and pushing it to array of filters.
         jQuery.sap.require("sap.ui.model.FilterOperator");
         var FilterOperator = sap.ui.model.FilterOperator;
         var filtersTerr =  new Array();
       for(i=0;i<name.length;i++){
      filterName = new sap.ui.model.Filter("FirstName", sap.ui.model.FilterOperator.EQ, name[i]);
      filter.push(filterName );
    this..getBinding("items").filter([filter],false);
    Final filter should be something $filter=FirstName='abc' or FirstName='pqr'.
    I have already looked into below discussions but somehow came to conclusion that array cannot be use with OR/AND.
    Odata Filter with OR
    http://scn.sap.com/thread/3462246
    http://scn.sap.com/thread/3560814
    Please let me know how this needs to be written.
    Thanks,
    Rahul

    Hi Rahul
    There are many ways.
    Filter for table
    var sRlUrl = "http://<host Name>/sap/opu/odata/sap/ZTWMP" ;
    var list = new sap.ui.model.odata.ODataModel( sRlUrl, false, "username", "pswd"); 
    list.setDefaultBindingMode(sap.ui.model.BindingMode.TwoWay);
    var iv_proID  = sap.ui.getCore().getElementById('input1').getValue();
    var iv_listNo = sap.ui.getCore().getElementById('input2').getValue();
    var iv_Matnr  = sap.ui.getCore().getElementById('input3').getValue();
    var iv_Po     = sap.ui.getCore().getElementById('input4').getValue(); 
    //... Set any Filters .. if reqd'
    var oFilter = new Array();
    var iCount = 0;
    if (iv_proID) {
    oFilter[iCount] = new sap.ui.model.Filter("abc", sap.ui.model.FilterOperator.EQ, sap.ui.getCore().getElementById('input1').getValue());
    iCount++;
    if (iv_listNo){
    oFilter[iCount] = new sap.ui.model.Filter("def", sap.ui.model.FilterOperator.EQ, sap.ui.getCore().getElementById('input2').getValue());
    iCount++;
    oFilter[iCount] = new sap.ui.model.Filter("PcTotal", sap.ui.model.FilterOperator.EQ,"HEADER" );
    iCount++;
    sap.ui.getCore().getElementById('T-POhdr-DR').setModel(list);
    //... Bind Rows with oData, with filters if any
    sap.ui.getCore().getElementById('T-POhdr-DR').bindRows({
    path: '/t_entity set/',
    filters: oFilter
    2 General filter
      OData.read({ requestUri: "http://<URL>:8001/sap/opu/odata/sap/ZTMP_ABC/Item?$filter=ID eq '"+ID+"' and DESC eq '"+Desc+"'", headers: { Accept: "application/json" } }, function (data, response) {
    if (data.results[0]) {
                     sap.ui.getCore().byId("oInput2").setText(data.results[0].<odata field to assign>;

  • Problem when working with multiple sequences

    Dears,
    In order to make life easier (I am currently working on a rather long project), I work with multiple sequences, one per chapter.
    My problem: I named one sequence "assembly sequences" in order to add the various sequences. I dropped the sequence no 1, then no 2. All works fine, beside that when playing the sequence no 2, I see two black lines on top and bottom of the screen for the all length of the sequence. Which is not the case when I click on the sequence itself and play it independently.
    Any idea how to solve this ?
    Thanks
    Nic

    Thanks, what happened is that :
    1st sequence is like this : Frame size 720x576 pixels, video rate 25fps, Compressor DV-Pal. And I think it is the one appropriate for me and my country.
    2nd sequence is like this : Frame size 720x480 pixels,
    video rate 29.97 fps, Compressor DV-DVPRO-NTSC.
    I think I should change the second sequence setting, but can I do it after all the work I have done, and continue making a 3rd, 4th and so on ?
    Tx for your precious help,
    Nicolas

  • Problem initiating process with multiple operations using HTTP/SOAP

    Hi,
    I have defined a process which has multiple operations. My process starts with a pick activity containing onMessage branches for each possible operation. When I initiate this service using the BPEL console, I choose one of the operations and everything works fine.
    However, when I initiate this process using an HTTP/SOAP web service call using JMeter, always the first branch is executed regardless of the message I send.
    My operations are document/literal. Due to some restrictions, I cannot define a SOAPAction for the operations. Could this be the problem? Is there a workaround for this? If this is not the problem, what could be the cause?
    I'm using version 10.1.2.1.
    Any help will be appreciated. Thanks in advance..

    hi i am using 10.1.3 and still i can not initiate a process with multiple operations. Is there anybody to tell if pick activity works fine and if there are some points to consider?
    If there is a problem is there any solution to make a process with multiple operations?

  • Problem on iOS 6 with wifi modem and music

    I have problem after update to iOS 6 on iPhone 4S: 1) after missing call, start music from podcast,before the music was turned off! 2) wifi modem , don't transfer the data on other device. They connect to iPhone!

    Hey maricel737
    There are two different articles that go over troubleshooting steps for solving issues with Wi-Fi and Bluetooth. This first one goes over Wi-Fi on your iPad:
    iOS: Troubleshooting Wi-Fi networks and connections
    http://support.apple.com/kb/ts1398
    This next one outlines suggestions for Bluetooth on your iPad:
    iOS: Third-party Bluetooth headsets, headphones, and keyboards
    http://support.apple.com/kb/ht1664
    On the Bluetooth one, I'd just skip ahead to the "Additional Information" section where the troubleshooting steps start.
    Best,
    David

  • Setup 1941 router with cable modem and 2 vlan?

    hello everyone,
    i need a little help setting up my new 1941 router with cable modem using 2 vlns.
    this is what i have:
    1- 1941 router configured as g0/0 wan port facing isp configured as (dhcp). g0/1 is lan facing the switch (192.168.1.1)
    dhcp pool (192.168.1.x)
    2- sg300-28pp switch.
    3- wap371 AP/ 11pcs..
    now everything is working perfect except sometimes we have more than 250 to 300 people trying to connect to the wifi, the router will have no enough ip addresses.
    i heard that i can setup 2 vlans to solve this problem? and is there any setup that i have to do on switch and Access points? 
    please i will appreciate any little help 
    Regards 

    hello Andre Neethling  i added network 192.168.0.0 255.255.254.0 to dhcp pool config and it seems that it is working but i am concern that i am going to have problem in the future so please take a look at the running config and let me know if i have everything done right. also we want to order static ip address from the provider for our security camera system and we will not longer receive dhcp ip from them and my router setup is to receive it as dhcp on g0/0 so what i should do about changing the settings on g0/0?
    i appreciate your help
    Building configuration...
    Current configuration : 1163 bytes
    ! Last configuration change at 00:46:35 UTC Wed Apr 15 2015
    version 15.0
    service timestamps debug datetime msec
    service timestamps log datetime msec
    no service password-encryption
    hostname Abdullah
    boot-start-marker
    boot-end-marker
    no aaa new-model
    no ipv6 cef
    ip source-route
    ip cef
    ip dhcp excluded-address 192.168.1.1 192.168.1.50
    ip dhcp pool Local
       import all
       network 192.168.0.0 255.255.254.0
       default-router 192.168.1.1
    multilink bundle-name authenticated
    license udi pid CISCO1941/K9 sn FTX1523022E
    redundancy
    interface GigabitEthernet0/0
     ip address dhcp
     ip nat outside
     ip virtual-reassembly
     duplex auto
     speed auto
    interface GigabitEthernet0/1
     ip address 192.168.1.1 255.255.255.0
     ip nat inside
     ip virtual-reassembly
     duplex auto
     speed auto
    ip forward-protocol nd
    no ip http server
    no ip http secure-server
    ip nat inside source list 101 interface GigabitEthernet0/0 overload
    ip route 0.0.0.0 0.0.0.0 GigabitEthernet0/0
    access-list 101 permit ip 192.168.1.0 0.0.0.255 any
    control-plane
    line con 0
    line aux 0
    line vty 0 4
     login
    scheduler allocate 20000 1000
    end

  • How do I set up Airport Extreme with cable modem and router?

    Hi--
    I'm having a house built and all of the wiring for TV, phone, and internet will be centralized in a closet. The cable modem can be placed there as well. In one room in the basement I want to use my Airport Extreme for my iMac and USB external hard drives. In another location of the basement, I'd like to set up a Time Capsule for another desktop and USB printer. If the cat5e comes out of the wall at each location, I "think" I need a router at the closet location. I also thought I might need an Airport Express upstairs on first or second floor to boost signal for my laptop. The house isn't that big so maybe that's overkill. So beyond the router question, do I want to set up a roaming network and have the Airport Express connected via ethernet or just wireless if the thought is that I need this? Finally, if I should connect cable modem to router to Airport Extreme, Time Capsule, etc., in what order and ports does the equipment get connected? Many thanks!!

    Welcome to the discussions, Forum Girl!
    It would be best to position the cable modem and main router in the central location like the closet if possible. The other devices would connect via ethernet to the wall jacks in each room.
    If you could setup a "roaming" wireless network as you mention, this will give you better wireless performance and coverage. This is the way commercial establishments like airports, businesses, etc. are configured for wireless.
    The order of connection would go something like this: ethernet connection > cable modem >main router>devices. Devices could be computers, routers, a backup device, etc. Since the Extreme has only 3 LAN ports for ethernet connections, you will also need to plan to install an "ethernet switch" near the location of the main router to provide enough ethernet jacks. If you are planning to use DirectTV, etc or your audio/video devices require ethernet connections (most new products do for updates and extra features), be sure to plan for that as well.
    Make sure that CAT5e or CAT6 wiring is run so you will be able to take advantage of faster gigabit speeds.
    Finally, it would be a good idea to work with an IT specialist to go over your plans to make sure all the bases are covered. This would be money well spent.

  • Why does my iPhone 4 not charge correctly?  Problem is definitely with the phone and not charges or chords.  Phone will charge but very slowly and no icon comes on.  Computer and iTunes doesn't recognize it a being connected.

    My iPhone 4 quit charging correctly.  It does charge but very slowly and icon doesn't indicate it as charging.  I've checked cables and charges and the problem is definetily with the phone.  My car stereo no longer recognizes it as a device.  Neither does the computer.  The real strange thing to me is that when I plug it into my old klispch speaker dock it will play songs.  My battery life is good when it is charged so I don't think its the battery. I've tried resetting the phone and cleaning the charging port.  I'm out of warranty.
    Would disconnecting the battery possibly reset it from some glitch or is the charging port got some bad contacts?

    I checked with the Genius Bar.  It was a new dilema to the lady that was helping me.  She took it to a back room and worked on it but it came out the same.  She gave me some options for repair or credit for replacement.
    I just kept the phone and put up with slowly charging it by plugging it in and then turning it off.
    I couldn't transfer anything from itunes.
    I finally got fed up and bought a new charging port for $10. and a toolkit for $3.  I looked up a video on youTube for the replacement and did it.
    That solved all the problems, it was the charging port, must have been some bad pins or something because it patially worked.

  • Problems sending emails with iPhone 3G and outlook exchange

    I have a problem sending email with exchange. Receiving and answering mail works fine and calender updates work fine. However when I initiate an email from the phone it syncs and ends up in the sent folder in the computer but never reaches the recipient. I have tried this many times with different recipients and phones. It only happens from my iphone and ipad. Any suggestions?
    Any help much appreciated

    The iPhone you returned is still syncing against your server and locking out your account. Someone possibly has access to your mail data. I'd recommend having your Exchange Administrator install the Microsoft Exchange Server ActiveSync Web Administration Tool (http://www.microsoft.com/downloads/details.aspx?FamilyID=E6851D23-D145-4DBF-A2CC -E0B4C6301453&displaylang=en) and attempt to wipe/delete/block that other iPhone.
    Message was edited by: ethanm

  • Problem syncing photos with Apple TV and iPod

    Ever since I connected my Apple TV I have had problems syncing photos with both my iPod and my Apple TV.
    The Apple TV gives me an error (no desciption) when I try to sync photos. The iPod gives me an error 39.
    iPhotos is working fine. I rebuilt the library using the rebuild library feature and this has not fixed the problem.
    I also rebuilt my iTunes library without success in fixing the problem.
    How does it sync? Is there some kind of syncing file I need to delete that may be corrupt?
    Does anyone have any ideas about what I could try?

    Just a suggestion,
    for a speedier and better informed reply, post your question in the AppleTV forums.

  • Comcast Troubles with RCA modem and WRT54G

    Can anyone help me set up my router with comcast?  I have searched the web endlessly trying to find a fix to set up my router with my modem.  When my computer is hard wired into my RCA modem thinks work like a breeze.   AS soon as I connect my router things go south.  I have endlessly tried cloning Mac address, power cycles (removed battery), to no avail.
    Currently I have
    Comcast Triple Play with an RCA Modem
    Linksys WRT54g running Tomatoe firmware.
    Im wondering if the firmware is the issue, or perhaps I am missing a step with that firmware.
    Any help would be much appreciated. 

    I have no knowledge about tomato firmware and how to configure it. However, configuration should be the same with Linksys firmware. It might be on a different tab or different name though. Here's the configuration.

  • Fed up with blocked emails and blacklisted IPs from Verizon

    Have been struggling with blocked emails and getting no help from Verizon.  When sending emails via Outlook, most are rejected whether we create them or just forward them.  Sometimes we get a spam notice, but most of the time they just disappear.  Have contacted Verizon support and they have changed the outgoing port number with no improvement.  They blame the signature block we attach to emails, but removing doesn't seem to improve anything.  They say we can't contact the spam people except by email, but that doesn't seem to get any response.  Meanwhile, the IPs that Verizon assigns us are on the blacklist.  Verizon says this has nothing to do with the problem, but I have to think that it does.  Would appreciate some help!

    Verizon doesn't control the blacklist at Spamhaus. The outbound spam filter has been implemented along with other measures as part of an effort to prevent that type of block for Verizon IP addresses, but until spammers are wiped from the planet, blacklisting is going to happen.
    To get off of the list, you have 2 options:
    Appeal to Spamhaus to remove your IP here. Since you have a dynamic IP address, you will have to do this every time you get a  blacklisted IP.
    -OR-
    You can get a static IP address from Verizon. This is the best solution for most businesses.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.
    "All knowledge is worth having."

Maybe you are looking for

  • Installed and Opens BUT CAN'T SEE WORKSPACE!!!

    I installed the trial version of Captivate 5 for MAC OS on my brand new Mac Book Pro. I can start up the program, I get the the startup screen, the program loads, I get the menu bar going across the top of my screen and close, ninimize, and expand bu

  • Adding font to Premiere

    Hello! I am working on a film and would like to add my own font for the credits. I'm using Premiere as my editing software. I have a paper version of the font alphabet I want to use. My question is: how do I get what I see on paper into Premiere, so

  • Can any one tell me how to send Body in Email

    Hi, I have a internal table which contain information Dear Sir, pls find attached file. Thanks and Regards chandra I want to send  that message with attached PDF file, my PDF file is going as a attached format if email address is maintained in Custom

  • Port forwarding with natd

    I have set up my Leopard Server with a public ip on Ethernet, 85.165.220.114, and a private ip on the Airport interface, 192.168.207.200. This is working well, I can access my server with a registered domain name from the internet, with web, ssh etc.

  • BIB-9509 error when trying to create query on 7 Dimensional Measure

    PART1 of the text below ----------------------------- Is there a limit on the ability to create a bibean query on measure that is associated with a large number of dimensions. Basically I am trying to create a bibean query on measure which has 7 dime