Search Results

Search found 18521 results on 741 pages for 'tcp window scaling'.

Page 9/741 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Relation between TCP/IP Keep Alive and HTTP Keep Alive timeout values

    - by Suresh Kumar
    I am trying to understand the relation between TCP/IP and HTTP timeout values. Are these two timeout values different or same? Most Web servers allow users to set the HTTP Keep Alive timeout value through some configuration. How is this value used by the Web servers? is this value just set on the underlying TCP/IP socket i.e is the HTTP Keep Alive timeout and TCP/IP Keep Alive Timeout same? or are they treated differently? My understanding is (maybe incorrect): The Web server uses the default timeout on the underlying TCP socket (i.e. indefinite) and creates Worker thread that counts down the specified HTTP timeout interval. When the Worker thread hits zero, it closes the connection.

    Read the article

  • WPF performance on scaling a large scene

    - by Mark
    I have a full screen app that I want to be able to zoom in on certain areas. I have the code working fine, but I notice that when I get closer in, the zoom in animation (which animates the ScaleTransform.ScaleX and ScaleTransform.ScaleY properties on a Parent canvas) starts to jerk down a little and the frame rate suffers. Im not using any BitmapEffects or anything, and ideally I would like my scene to get more complicated than it currently already is. The scene is quite large, 1980x1024, this is a requirement and cannot be changed. The current layout is like this: <Canvas x:name="LayoutRoot"> <Canvas x:Name="ContainerCanvas"> <local:MyControl x:Name="c1" /> <!-- numerous or ther controls and elements that compose the scene --> </Canvas> </Canvas> The code that zooms in just animates the RenderTransform of the ContainerCanvas, which in tern, scales its children which gives the desired effect. However, Im wondering if I need to swap out the ContainerCanvas for a ViewBox or something like that? Ive never really worked with ViewBox/Viewport controls before in WPF can they even help me out here? Smooth zooming is a huge requirement of the client and I must get this resolved. All ideas are welcome Thanks a lot Mark

    Read the article

  • image scaling with C

    - by sa125
    Hi - I'm trying to read an image file and scale it by multiplying each byte by a scale its pixel levels by some absolute factor. I'm not sure I'm doing it right, though - void scale_file(char *infile, char *outfile, float scale) { // open files for reading FILE *infile_p = fopen(infile, 'r'); FILE *outfile_p = fopen(outfile, 'w'); // init data holders char *data; char *scaled_data; // read each byte, scale and write back while ( fread(&data, 1, 1, infile_p) != EOF ) { *scaled_data = (*data) * scale; fwrite(&scaled_data, 1, 1, outfile); } // close files fclose(infile_p); fclose(outfile_p); } What gets me is how to do each byte multiplication (scale is 0-1.0 float) - I'm pretty sure I'm either reading it wrong or missing something big. Also, data is assumed to be unsigned (0-255). Please don't judge my poor code :) thanks

    Read the article

  • tcp connect hangs on SYN_SENT if something listens, gets CONN_REFUSED if nothing listens

    - by Amos Shapira
    I'm hitting a very strange problem - when I try to connect to one of our servers the client hangs with SYN_SENT if something listens on the port (e.g. Apache on port 80, sshd on port 22 or SMTP on port 25) but if I try to connect to a port on which nothing listens then I immediately get a "CONNECTION refused" error. Connecting to other applications (e.g. rsyncd on some arbitrary port) succeeds. I ran tcpdump on the server and see that the SYN packets arrive to it but it only sends a response if nothing listens on that port. e.g.: on the server I run: # tcpdump -nn port 81 06:49:34.641080 IP 10.x.y.z.49829 server.81: S 3966400723:3966400723(0) win 12320 06:49:34.641118 IP server.81 x.y.z.49829: R 0:0(0) ack 3966400724 win 0 But if I listen on this port, e.g. with nc -4lvvv 81 & Then the output of tcpdump is: 06:44:31.063614 IP x.y.z.45954 server.81: S 3493682313:3493682313(0) win 12320 (and repeats until I stop it) The server is CentOS 5, the client is Ubuntu 11.04, the connection is done between two LAN's over per-user TCP OpenVPN. Connection to other servers on that network do not have a problem. Connecting from the other servers on the same network to that server works fine. Connections from other clients in our office over openvpn is also not a problem. What am I missing? Thanks.

    Read the article

  • Extract derived 3D scaling from a 3D Sprite to set to a 2D billboard

    - by Bill Kotsias
    I am trying to get the derived position and scaling of a 3D Sprite and set them to a 2D Sprite. I have managed to do the first part like this: var p:Point = sprite3d.local3DToGlobal(new Vector3D(0,0,0)); billboard.x = p.x; billboard.y = p.y; But I can't get the scaling part correctly. I am trying this: var mat:Matrix3D = sprite3d.transform.getRelativeMatrix3D(stage); // get derived matrix(?) var scaleV:Vector3D = mat.decompose()[2]; // get scaling vector from derived matrix var scale:Number = scaleV.length; billboard.scaleX = scale; billboard.scaleY = scale; ...but the result is apparently wrong. PS. One might ask what I am trying to achieve. I am trying to create "billboard" 3D sprites, i.e. sprites which are affected by all 3D transformations except rotations, thus they always face the "camera".

    Read the article

  • Cocoa/Objective-C - Child window with text input without main window becoming inactive

    - by Josh
    Hello All, I have a need to spawn a window that will hover just above my main window in a cocoa application. I want this main window to allow the user to enter some text in an input box. All is well until the text input box actually gains focus. The main window becomes "deactivated." This window is borderless and is a slightly custom shape -- its more like a hover card than anything else, I suppose. Basically, I'd like this thing to work almost exactly like Spotlight (Apple + Space) -- you can enter text, but this is such an an ancillary operation that in the context of the greater UX, you don't want the jarring effect of the main window graying out (becoming inactive). You'll notice when you have some application open and in-focus, spotlight will not cause the window of that application to become inactive. This problem arises because text input seems to REQUIRE that the child window become the key window (it will not let you place the cursor in the text input field). When it becomes key, the main window becomes inactive. So far I've tried: Subclassing NSWindow for my main application and overriding isKeyWindow such that it only loses key when the application is no longer the users focus (as opposed to the window). This had the unintended effect of colliding with key status of the child window and having very strange effects on the keyboard input (some keys are not captured, like delete) Creating a view instead of a window. Doesn't work because of this problem -- you cannot draw over a Webkit WebView these days. Anybody Cocoa/OSX wizards have any ideas? I've become a little obsessed with this one. An itch I can't scratch.

    Read the article

  • android ImageView scaling to fit another View

    - by Nick
    I have a relative layout that comprises a TextView and an ImageView: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true"/> <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:adjustViewBounds="true"/> </RelativeLayout> It looks as follows: What I want to achieve is: It means that I want my ImageView to scale to fit the TextView by height. Can it be done in xml, without java-coding? If I could write something like android:layout_height="match_that_TextView" it would have solved this issue, but it's impossible I guess.

    Read the article

  • iPhone Web Development Image Scaling

    - by Dominic Godin
    I am developing a simple web page to be viewed after an iphone application completes. I am finding the safari degrades the image quality of the jpg so its all fuzzy. The image is background image applied to a div div.foo { background: url(../images/foo.jpg) no-repeat; width:320px; height:349px; } The width and height are exactly the same as the jpg image. Is there a way to make sure the image gets displayed in its full quality?

    Read the article

  • Real benefits of tcp TIME-WAIT and implications in production environment

    - by user64204
    SOME THEORY I've been doing some reading on tcp TIME-WAIT (here and there) and what I read is that it's a value set to 2 x MSL (maximum segment life) which keeps a connection in the "connection table" for a while to guarantee that, "before your allowed to create a connection with the same tuple, all the packets belonging to previous incarnations of that tuple will be dead". Since segments received (apart from SYN under specific circumstances) while a connection is either in TIME-WAIT or no longer existing would be discarded, why not close the connection right away? Q1: Is it because there is less processing involved in dealing with segments from old connections and less processing to create a new connection on the same tuple when in TIME-WAIT (i.e. are there performance benefits)? If the above explanation doesn't stand, the only reason I see the TIME-WAIT being useful would be if a client sends a SYN for a connection before it sends remaining segments for an old connection on the same tuple in which case the receiver would re-open the connection but then get bad segments and and would have to terminate it. Q2: Is this analysis correct? Q3: Are there other benefits to using TIME-WAIT? SOME PRACTICE I've been looking at the munin graphs on a production server that I administrate. Here is one: As you can see there are more connections in TIME-WAIT than ESTABLISHED, around twice as many most of the time, on some occasions four times as many. Q4: Does this have an impact on performance? Q5: If so, is it wise/recommended to reduce the TIME-WAIT value (and what to)? Q6: Is this ratio of TIME-WAIT / ESTABLISHED connections normal? Could this be related to malicious connection attempts?

    Read the article

  • Does ImageIO read imply anti-aliased scaling?

    - by tigger
    I've replaced the Java internal ImageFetcher with an own implementation using ImageIO. Some image renderers of our software, which use these images, now draw anti-aliased scaled images instead of non anti-aliased. The only change is the source of the image, which are now BufferedImages instead of Toolkit-Images. The question now is, where is the difference? Which property causes the images to scale anti-aliased? I've always thought that the anti-alias key ONLY depends on the graphics I paint on - but this is obviously wrong. By the way: unfortunately I cannot change the renderers.

    Read the article

  • Scaling an Image in GWT

    - by Daniel
    Changing the size of an Image Widget in GWT changes the size of the image element, but does not rescale the image on the screen. Therefore, the following will not work: Image image = new Image(myImageResource); image.setHeight(newHeight); image.setWidth(newWidth); image.setPixelSize(newWidth, newHeight); This is because GWT implements its Image widget by setting the background-image of the HTML <img... /> element as the image, using CSS. How does one get the actual image to resize?

    Read the article

  • Close TCP connection when owner process is already killed

    - by Otiel
    I have a Windows service that - when it starts - opens some WCF services to listen on the 8000 port. It happens that this service crashes sometimes. When it does, the TCP connection is not released, thus causing my service to throw an exception if I try to start it again: AddressAlreadyInUseException: There is already a listener on IP endpoint 0.0.0.0:8000 Some observations: When running CurrPorts or netstat -ano, I can see that the 8000 port is still in use (in LISTENING state) and is owned by the Process ID XXX that corresponded to my service process ID. But my service has already crashed, and does not appear in the Task Manager anymore. Thus I can't kill the process to free the port! Of course, running taskkill /PID XXX returns: ERROR: The process "XXX" not found. When running CurrPorts or netstat -b, I can see that the process name involved in creating the listening port is System, and not as MyService.exe (whereas it is MyService.exe when my service is running). I tried to use CurrPorts to close the connection, but I always get the following error message: Failed to close one or more TCP connections. Be aware that you must run this tool as admin in order to close TCP connections. (Useless to say, I do run CurrPorts as Administrator...) TCPView is not much help either: the process name associated to the 8000 port is <non-existent>, and doing "End process" or "Close connection" has no effect. I tried to see if there was not a child process associated with the PID XXX using Process Explorer, but no luck here. If I close my service properly (before it crashes), the TCP connection is correctly released. This is normal, as I close the WCF service hosts in the OnStop() event of my service. The only way I found to release the connection is to restart the server (which is not convenient in a production environment as you can guess). Waiting does not help, the TCP connection is never released. How can I close the connection without restarting the Windows server? PS: found some questions extremely similar to mine.

    Read the article

  • TCP Server Memory management: #Connections Vs. #Requests

    - by Andrew
    Given that, there is no theoretical limit to number of concurrent TCP connections a Windows 2008 server can handle. Only thing will happen is, with each connection there will be memory consumption in server. Unfortunately, memory is not unlimited (and I want to utilize only physical memory). For example, lets say we've 2GB server memory. Now there are two extreme cases: Case 1: If we've allocated 64KB buffer for each connection (only to receive incoming request), then 32768 connections can consume all the 2GB of memory. This will not leave any memory to queue/process incoming requests from those connections. Case 2: On the other hand, lets say a single (or very few) connections continuously keeps sending request buffers (for example, video streaming from one connection to other) and server cannot process them within time, those buffers will get piled up in server and eventually will occupy most of the servers memory. And it will not leave any memory for new connection thereafter. This is the real dilemma in server design bugging me badly for last many days. If I can decide on max size of request buffer per connection and max number of requests to allow in queue per connection. Then, based on available server memory, it will then automatically set limit on max number of concurrent connections. How to decide on these limits to achieve best performance and throughput? I am just looking for perfect utilization of server resources. Are there any standard guidelines or empirical data available with someone who can share with me please.

    Read the article

  • Javascript/Canvas/Images scaling problem in Firefox

    - by DocTiger
    I have a problem with the context2d's drawImage function. Whenever I scale an image, it gets a dark border of one pixel, which is kind of ugly. That does only happen in Firefox, not in Opera or Webkit. Is this an antialiasing problem? For hours I studied the examples and available documentation without getting rid of it... I couldn't yet try it on another computer so maybe just maybe it's an issue with the graphics hardware/drivers. I have reproduced this effect with this minimal snippet, assuming exp.jpg is sized 200x200 pixels. <html> <body> <canvas id="canvas" width="400" height="400"></canvas> </body> <script type="text/javascript" src="../../media/pinax/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" > context = $('#canvas')[0].getContext('2d'); img = new Image(); img.src = "exp.jpg"; //while (!img.complete); context.drawImage(img, 2,2,199,199); context.drawImage(img, 199,2,199,199); </script> </html>

    Read the article

  • IE6 image scaling with bicubic filter

    - by thehuby
    I have a project where I have to resize some images in the actual browser side. IE8, FF3 et al all apply a filter to smooth the resizing of the image, so in these browsers everything looks good. In IE7 I have applied the following fix which works great: -ms-interpolation-mode:bicubic; In IE6 however I can only find references to the AlphaImage Filter (the same one used to enable alpha transparency on PNG files). However I can't find an example of how to use it, nor have I been able to get it working myself. Can anyone provide me with an example? Preferably applied to actual img tags, though I could use background images if required. MSDN link (for what its worth): http://msdn.microsoft.com/en-us/library/ms532969%28VS.85%29.aspx The code I am using in my CSS is applied to the img, though I've tried applying it to the img container as well (with no effect): #provider-list li img { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="/image.gif", sizingMethod="scale"); } A thousand thank you's in advance :) Rick

    Read the article

  • TCP/UDP hole punching from and to the same NAT network

    - by Luc
    I was wondering if tcp/udp hole punching would still work when you are in the same network (behind a NAT), and what the packet's path would be. What happens when using hole punching on the same network, is that it will send a packet out with the same destination and source address. Only the source and destination port would differ. I imagine a router with NAT loopback enabled will handle this as it should, but how about other routers? Would they drop the packet, or would a router (the first?) from the ISP bounce the packet back after which it gets handled okay? I'm wondering because I was thinking about using this technique to circumvent a block between peers in a network (like a school network where clients can only access the internet, but any contact with each other is blocked). The only other option is to use a man in the middle as proxy (tunnel?). The disadvantage of this is that you have to have a server with significantly more bandwidth than one that would only do hole punching. Also the latency would increase significantly.

    Read the article

  • Can I reuse my existing TCP-Server?

    - by Helper Method
    At the moment I have an existing application which basically consists of a desktop GUI and a TCP server. The client connects to the server, and the server notifies the client if something interesting happens. Now I'm supposed to replace the desktop GUI by a web GUI, and I'm wondering if I have to rewrite the server to send http packets instead of tcp packets or if I can somehow use some sort of proxy to grab the tcp packets and forward them to the web client? Do I need some sort of comet server?

    Read the article

  • 2D pixel array rotation and scaling

    - by Betamoo
    Hi I am working on C# program to process images ( given as int[,] ).. So I have 2D array of pixels, and I need to rotate them around a point, then scale them down to fit the original array.. I already found articles about using matrix to transform to a point and rotate then transform back.. What remains is to scale the resultant image to fit an array of original size.. How that can be done? (preferably with 2 equations one for x and one for y ) Thanks in advance

    Read the article

  • Website latency and bad tcp packets

    - by Mistero Lupo
    I have multiple websites hosted on a Linode VPS and I'm having an issue with one of them: every page that I try to load has about 10 seconds latency. Apache logs are clean and the other websites on the same machine are running well. At a first glance I tought it was a memory problem since the VPS has got only 512M, but from the linode dashboard CPU and Disk I/O are normal. Anyway here we have the ram status: $ free -m total used free shared buffers cached Mem: 487 463 23 0 2 55 -/+ buffers/cache: 404 82 Swap: 255 155 100 Only 23M free, but if it was a memory problem why other websites are going as usual? I took a live capture with wireshark, and there are some duplicates SYN ACK packets just before the 10 seconds gap. I'm out of ideas, looking for some clues. Wireshark live capture screenshot As you can see from the image, the gap is after the last bad tcp. Thank you in advance. UPDATE I've checked Apache2 logs in debug error level, and this is where something is appening: 151.97.156.191 - - [14/Nov/2012:11:19:40 +0100] [www.fmaisi.it/sid#7f32c625a220][rid#7f32c6801578/subreq] (3) [perdir /home/fmaisi/sites/www.fmaisi.it/public_html/] applying pattern '^index\.php$' to uri 'index.php' 151.97.156.191 - - [14/Nov/2012:11:19:40 +0100] [www.fmaisi.it/sid#7f32c625a220][rid#7f32c6801578/subreq] (1) [perdir /home/fmaisi/sites/www.fmaisi.it/public_html/] pass through /home/fmaisi/sites/www.fmaisi.it/public_html/index.php 151.97.156.191 - - [14/Nov/2012:11:19:54 +0100] [www.fmaisi.it/sid#7f32c625a220][rid#7f32c6537c78/initial] (3) [perdir /home/fmaisi/sites/www.fmaisi.it/public_html/] strip per-dir prefix: /home/fmaisi/sites/www.fmaisi.it/public_html/wp-content/plugins/wp-filebase/wp-filebase_css.php -> wp-content/plugins/wp-filebase/wp-filebase_css.php 151.97.156.191 - - [14/Nov/2012:11:19:54 +0100] [www.fmaisi.it/sid#7f32c625a220][rid#7f32c6537c78/initial] (3) [perdir /home/fmaisi/sites/www.fmaisi.it/public_html/] applying pattern '^index\.php$' to uri 'wp-content/plugins/wp-filebase/wp-filebase_css.php' As you can see there is a gap of 14 seconds after the pass through of index.php. Any suggestions? I'm out of ideas again.

    Read the article

  • Designing a persistent asynchronous TCP protocol

    - by dogglebones
    I have got a collection of web sites that need to send time-sensitive messages to host machines all over my metro area, each on its own generally dynamic IP. Until now, I have been doing this the way of the script kiddie: Each host machine runs an (s)FTP server, or an HTTP(s) server, and correspondingly has a certain port opened up by its gateway. Each host machine runs a program that watches a certain folder and automatically opens or prints or exec()s when a new file of a given extension shows up. Dynamic IP addresses are accommodated using a dynamic DNS service. Each web site does cURL or fsockopen or whatever and communicates directly with its recipient as-needed. This approach has been suprisingly reliable, however obvious issues have come up and the situation needs to be addressed. As stated, these messages are time-sensitive and failures need to be detected within minutes of submission by end-users. What I'm doing is building a messaging protocol. It will run on a machine and connection in my control. As far as the service is concerned, there is no distinction between web site and host machine -- there is only one device sending a message to another device. So that's where I'm at right now. I've got a skeleton server and a skeleton client. They can negotiate high-quality authentication and encryption. The (TCP) connection is persistent and asynchronous, and can handle delimited (i.e., read until \r\n or whatever) as well as length-prefixed (i.e., read exactly n bytes) messages. Unless somebody gives me a better idea, I think I'll handle messages as byte arrays. So I'm looking for suggestions on how to model the protocol itself -- at the application level. I'll mostly be transferring XML and DLM type files, as well as control messages for things like "handshake" and "is so-and-so online?" and so forth. Is there anything really stupid in my train of thought? Or anything I should read about before I get started? Stuff like that -- please and thanks.

    Read the article

  • Image Auto Resize / Scaling with JQUERY

    - by spotlightsnap
    Hello, I have a div with width 600 px. I want to pull the images dynamically. Images size are varies. What I want to do is, if the image size is more than 600 px, we will resize the image to 600 px to fit into the div. But if the image is not more than 600px, we will leave as original image width. How can i achieve that by using jquery ? Thanks.

    Read the article

  • Strange 3-second tcp connection latencies (Linux, HTTP)

    - by user25417
    Our webservers with static content are experiencing strange 3 second latencies occasionally. Typically, an ApacheBench run ( 10000 requests, concurrency 1 or 40, no difference, but keepalive off) looks like this: Connection Times (ms) min mean[+/-sd] median max Connect: 2 10 152.8 3 3015 Processing: 2 8 34.7 3 663 Waiting: 2 8 34.7 3 663 Total: 4 19 157.2 6 3222 Percentage of the requests served within a certain time (ms) 50% 6 66% 7 75% 7 80% 7 90% 9 95% 11 98% 223 99% 225 100% 3222 (longest request) I have tried many things: - Apache2 2.2.9 with worker or prefork MPM, no difference (with KeepAliveTimeout 10-15) - Nginx 0.6.32 - various tcp parameters (net.core.somaxconn=3000, net.ipv4.tcp_sack=0, net.ipv4.tcp_dsack=0) - putting the files/DocumentRoot on tmpfs - shorewall on or off (i.e. empty iptables or not) - AllowOverride None is on for /, so no .htaccess checks (verified with strace) - the problem persists whether the webservers are accessed directly or through a Foundry load balancer Kernel is 2.6.32 (Debian Lenny backports), but it occurred with 2.6.26 also. IPv6 is enabled, but not used. Does the issue look familiar to anyone? Help/suggestions are much appreciated. It sounds a bit like a SYN,ACK packet getting lost or ignored.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >