Does the socket implementation suport only 2 simultaneous connections?

Hi all,
I implemented this server the traditional way:
public void run() {
   while(state.isRunning()) {
      try {
         System.out.println("listening...");
         sourceSock = ssock.accept();
         System.out.println("new incoming connection");
         sourceSock.setSoTimeout(config.getHttpTimeout());
         new Thread(new ProxyHttpConnectionWorker(sourceSock, config)).start();
      } catch (IOException _ex) {
         config.out.trace(_ex.getMessage());
}It seems ok to me. I implemented it several times in a lot of situations.
However, this time I noted that after two simultaneous socket connections are opened (via accept()), all other connections I try to make from a client are blocking until one of the first two sockets close().
I mean, it seems to be blocking the incoming connections in the accept() method, because the string "listening..." was printed, but the string "new incoming connection" is only printed when one of the two initial sockets close()
Why is this happening? Is this correct?
I implemented it with J2SE 1.3.1 in a windows NT 4 workstation machine.
Is this an Operating System problem? A TCP/IP problem? Is the problem in the java socket implementation? Is there any flaw in my code?
Thank you all in advance,
Filipe Fedalto

Hi, Chuck
It could also be the case.
Actually, I am implementing a proxy server. All the major work is done and were it not this accept() problem it would be functioning very well.
The server is running in my machine and I am testing it by issuing 4 simultaneous HTTP requests from Internet Explorer 5.5 from my own machine itself. So, you see, this could be the problem, according to what you've just said.
I try to open the 4 browser connections simultaneously, but the servers' accept() method only seems to receive 2 of them at a time.
What do you think about it?
Just in case, I will try and test it using Netscape. Let's see if the number of simultaneous connections change...
Notwithstanding, why do the browsers limit the number of concurrent connections? I might think that this is because it is better to open a single page or two faster than trying to open 5 or 6 pages slowly... is this the point?
Thank you very much!
Filipe Fedalto

Similar Messages

  • Why does the iphone 4 work only intermittently with the Sony HCB150 speakerphone?

    Why does the iphone 4 work only intermittently with the Sony HCB150 speakerphone?

    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new).  Try each of these in order until the issue is resolved.
    If the issue persists, take the device to Apple for further assistance.

  • HT1937 does the iphone 4 take a sims card or does the iphone 4 (GSM) only have take a sims card???

    ok so I'm getting an iPhone 4 and I want it to be an AT&T carrier. So I looked on the internet to find that the iPhone 4 (GSM) has a Sims card. Is the iPhone 4 have a Sims card or does the iPhone 4 (GSM) only have a Sims card? Please help me I'm really confused and want an iPhone that has a sins card!!!!

    The GSM iPhone 4 is the only one to take Sim Cards

  • Why does the album artwork appear only when the first song is playing only?

    Why does the album artwork appear only when the first song is playing only?

    Hello ckuan. Thx for your reply.
    The songs are not from iTunes, they are from CDs that I had copied to my itunes library.
    It is worth mentioning that I wasn't facing this issue before IOS 5.

  • Does NET8 2-tier server have a simultaneous connection limit ?

    Does NET8 2-tier server have a simultaneous connection limit ?
    I came across one article that has a 100 simultaneous connection listing for 2-tier.
    Please let me know
    George

    Yes, My WRT610N is currently using both 2.4Ghz and 5.0Ghz at the same time. I'm using WPA2 Private with AES on both frequencies. I'm currently getting 135mbps on both frequencies. Both are stable at 30 feet but the Actual throughput is better on the 2.4Ghz frequency and also range.
    I think the reason that i'm restricted to 135mbps is the Intel wifi link 5100 can only transfer at a maximum of 150 mbps.
    This router has always been stable although i did loose my network one night it dived to 6mbps for apparently no reason at all. But i believe that this issue was due to an update on my Laptop. I fixed this by removing the Wifi adapter drivers and reinstalling them.
    5 G Network
    Mode:   Wireless-N Only     
    Network Name (SSID):   N/A    
    Radio Band:   Wide - 40MHz Channel     
    Wide Channel:   38     
    Standard Channel:   36     
    Security:   WPA2-Personal      
    SSID Broadcast:   Enabled  
    2.4 G Network
    Mode:   Mixed     
    Network Name (SSID):   N/A 
    Radio Band:   Wide - 40MHz Channel     
    Wide Channel:   8     
    Standard Channel:   6     
    Security:   WPA2-Personal      
    SSID Broadcast:   Enabled  
    ** Note these settings are from the Status / Wireless Network page on the router, all wide channel / standard channels are actually set to Auto

  • I made a bootable disc on an external hard drive, with Yosemite on it.  I am running Snow Leopard on my iMac.  How can I open the Yosemite disc from the desktop on my iMac?  Does the external hard drive need to be connected to my iMac by firewire to

    I made a bootable disc on an external hard drive, with Yosemite on it.  I am running Snow Leopard on my iMac.  How can I open the Yosemite disc from the desktop on my iMac?  Does the external hard drive need to be connected to my iMac by firewire to do that?

    kahjot wrote:
    Snow Leopard's Startup Disk pref can’t see Yosemite volumes. So the only way to switch from Snow Leopard to Yosemite is to do what Niel mentioned. Doesn't matter whether it's connected by USB or Firewire, although performance via FW would be faster.
    Are you saying that Yos/10.10, as a volume located in a mounted external drive won't appear as an option in Snow Leopard's Startup Disc, in Sys Prefs? I've never heard this one before. AFAIK any mounted volume, regardless of OS, should appear there. I would think that, if it appears in the Boot Picker/Startup Manager it would also appear and could be booted to from Snow's Startup Disk. I can't test this myself, since I don't have Yos. Is what you are saying documented somewhere?

  • Does the AppleTV have to have an Internet connection to use Air Play?

    Does the AppleTV have to have an Internet connection to use Air Play?

    Is your iPad connected to a network? The TV needs to be connected to the same network. Do you have an internet router? If both devices are connected to it then they can also communicate  directly.

  • How does the servlet implement the multi-thread feature?

    There is only one instance of every servlet in one wep application.
    When several clients invoke the doPost() method of the same servlet,the servlet can process their request respectively.
    So there much multi threads of one servelt.
    But the Servlet doesn't implement the Runnable interface of extends the Thread class.
    I wan't to know,how does the servlet/servlet container implement the multi-thread feature?

    Hi johnnylzb
    There is only one servlet instance existing.
    (assuming u have <load-on-startup>1</load-on-startup>)
    The server creates a thread for every request ..
    and all the threads access the same servlet instance.
    For this its not necessary for the Servlet to extend Thread or Runnable.
    hope this helps

  • Does the Apple TV work only on specific types of TV's?

    We are thinking of buying a new TV, because our current one has 3 random huge red lines going vertically through it. Anyway, I was looking at TVs just a minute ago, and I remembered the Apple TV. Well, there's something called a "Smart TV" which means it can use the internet for Netflix, YouTube, Pandora, AccuWeather, etc. Anyway, I was looking at the Apple TV.
    1) Does the Apple TV only work with like a certain size, company, type (ie HDTV, LTE or whatever, Plasma, etc), etc.?
    2) Does the Apple TV basically make a normal TV a smart tv? Does it allow internet and all that easily? Also, when watching movies on the Apple TV thing, will it play full screen? Will this only happen on certain TVs?
    Thanks!

    No not any more then Xbox or playstations does

  • Does the EQ setting affect only audio played from the Music app?

    Does the EQ setting in Settings -> Music affect only audio played from the Music app or does it also affect any other audio? Specifically, I'd like to know if the setting is applied to audio podcasts that are played from Downcast. Thanks!
    --VV

    They will only affect the Music app.

  • When ordering MacBook, does the keyboard come with only the language I specified, for example Arabic, or both Arabic and English?

    I'm planning to order a MacBook Pro from the apple store, but I was wondering if I order it with an Arabic keyboard, does the keyboard buttons only contain Arabic, or do the buttons contain both Arabic and English?

    RSBR wrote:
    I'm planning to order a MacBook Pro from the apple store, but I was wondering if I order it with an Arabic keyboard, does the keyboard buttons only contain Arabic, or do the buttons contain both Arabic and English?
    The buttons contain both Arabic and English.
    All keyboards with non-Latin scripts printed on them also have English printed on them.  Otherwise you could not type email and webpage addresses and the computer would be of very limited use.
    You can see the actual keyboards produced by Apple at
    http://support.apple.com/kb/ht2841

  • HT1349 My  ipod touch 4th gen, will not let me access facebook or you tube it just takes ages to load then fails.  I have reset the ipod but its still doing the same.  Its only two months old, does anyone know how to fix it?

    My sons ipod touch has stopped letting him access facebook or you tube.  On entering the app or going in via safari it just states loading for ages then fails, I have reset it for him, but it hasn't helped.  Is this a common problem?  It is only 2 months old.

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       
    also
    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • Newbie M5 question - How does the Censor effect blur only the inside of the circle?

    I'm brand new to Motion 5. I'm trying to understand how an effect like "Censor" applies the blur to only the inside of the circle. I opened the Censor effect in M5 and studied it, but the answer is just out of my grasp. Can someone explain it to me, or point me to an article that will help? Thanks.
    Dan

    In Motion, in the Censor effect project, if you turn off the Effect Source (lowest layer) you'll see the "circle" used to "limit" the effect.
    Actually, this is just an illusion:
    The original Effect Source (in FCPX, that's whatever clip this effect is applied to) is Cloned (the layer is called "Mask"): a clone is basically a "rasterized copy" of the original -- what I mean by that is that Clones not only copy original objects, but also all their filters and other layers/effects if you clone a group of objects -- reducing them all down to a single layer copy.  This copy can be treated just like any other object in Motion (with an interesting exception*): you can add masks and other filter effects and/or behaviors to create new actions while the original source of the clone is left intact.
    In this effect, there is a Circle Mask applied to the Clone, as well as three different Filters: Pixellate, Gaussian Blur, and Brightness. These three different filters are turned on and off separately by use of a "pop-up" rig so that only one of the filters is applied to the clone at a time.  The gear shaped objects are Behaviors, in this case Link behaviors that "link" to the Circle Blur filter properties that is attached to the Effect Source which control the location in the canvas and the scale of the mask (Radius to Scale-X and another to Scale-Y). The Circle Blur filter has Onscreen Controls of a center point and a "radius" and those property values can be shared to other objects in a project via these link behaviors. The Circle  Blur filter effect is turned off in this project because it *only* needed as a *source* for the onscreen control properties (and those can be turned on for use in FCPX [Publish OSC] whether the filter type is used or not.)  All of the visible action in this project is created by applying other filter effects to the Clone copy and masking the area so that the rest of the source is uneffected while this effect (Censor) is active in FCPX.
    The *interesting exception: Clones can be "retimed" -- even timed to go in reverse. No other object (other than actual video) can be made to do the same. What does this mean? It means that you can create, basically, an "in-project" video of other objects in animation (without exporting the animation first) and retime them to loop over and over, go in reverse, speed up, slow down, etc... Clones are a very useful tool in Motion (not to mention "light-weight").  Their only drawback: they *flatten* 3D animations, so you can't apply "more 3D" effects to them because they'll just look flattened on a plane if you do. So any time you feel you need to duplicate something, ask yourself if you would be better served by a clone instead.
    HTH

  • How does the ipad mini wifi only know my location when not connected to wifi?

    I thought the wifi only ipad mini does not have a gps chip.  Yesterday however, I was driving around with my wife in the car (no wifi) and the ipad mini was able to keep track of my location on the map I had pre-downloaded.  How is this possible?

    Your WiFI only position is determined by the iPad keeping track of the names and intensity of the various WiFi signals and comparing that to a database of WiFi access points with their locations.

  • Why does the highlighting/underlining feature only select parts of words?

    Is there a reason why in certain PDF's I can only select parts of words? Before in the same document I was able to select, underline, highlight, etc., with no problem. Has there been an update or change to the software that causes this to happen? Can it be fixed?

    I'm using Surface Pro 2 Tablet running Windows 8.1
    T. Noble Jr.

Maybe you are looking for

  • Div Color Questions

    Alright, I'm brand new to CSS and to Dreamweaver so please be easy on me if this is a completely idiotic question .  I have just started some code for a site I'm working on.  I have it almost set up how I want it minus the bells and whistles.  My onl

  • How do i scan multiple pages for one attachment

    I know how to scan but I don't know how to scan multiple pages for one attachement....Help please

  • Flatten PDF with Attachments

    Hi, I, 1. render a xdp in browser (via servlet) 2. fill out the form, attach some files 3. submit the form as PDF (via servlet) 4. launch a process that flattens the PDF file the flattened PDF doesn't include attachments no more, it was lost durning

  • Speaker system for MacPro

    Hi All, Sorry if this is a basic question but I have not been able to find an answer... I just purchased a new MacPro and want to get some speakers for it so I can listen to music and watch DVD's. I was thinking 5.1 surround but read that Apple does

  • Can't access desktop icons

    Hello, I'm having an intermittent problem with the desktop icons on my MacBook Pro. Occasionally, the desktop icons become inaccessible. I'll hover over them with the mouse and can't click on them. I'll also sometimes add a document to the desktop an