Programming :: Sockets - P2 - P3 Http Connection Taking More Time Than The Expected?

Mar 31, 2011

Iam using socket programming in one of my problem. The scenario is like this.

=>one module is working as a socket server(process p1) is able to handle client sockets on that port.
=>one module is working as socket client (process p2) is connected to server socket and Tx/Rx data on this socket. This module has some more threads, based on received data from server socket it will connect to http on other thread and get information...
=>one more module is working as socket client (process p3) is also connected to server socket and doing some other transactions.

Here my problem is when in presence of p2, p3 http connection taking more time than the expected. If we wont start p3(means only one server-client socket) then http connection is fast enough.

View 1 Replies


ADVERTISEMENT

Programming :: Send A Request To A Http Server Without Using Sockets.

Jul 8, 2011

Hi, is it possible to send a request to a http server without using sockets?

View 7 Replies View Related

Programming :: Linking Of Fortran Executable Taking Exorbitant Amounts Of Time?

Mar 24, 2010

The issue I am currently facing is more of an annoyance / curiosity, and it may not even be a problem, but it sure feels like one. Background: I am becoming a computational chemist (grad school begins in the fall) and the code I run is all in fortran. I am currently compiling with gfortran. When I compile the code (on a box running ubuntu server), everything appears to compile fine, but the linking stage is taking five to ten minutes. I ran the time command while making it and got the following results.

Quote:

time make
gfortran -c -O3 -fomit-frame-pointer -finline-functions -ffast-math suijtab.f
Linking testCompile ...
done

[code]...

I just don't understand why it is taking 5 minutes of real time if it only takes 10 - 15 sec of system time?

View 4 Replies View Related

Programming :: Java - Many Redirects On HTTP Connection?

Feb 1, 2011

I'm trying to open a web page to automate some data checking, and I'm getting a "too many redirects" exception. I'm not experienced enough with Java to know what to try next, and would like some help.

I'll show the code for what I've tried, but first, details about the website:[URL].. The website is a series of aspx pages. Going to the above address in a browser gets you to "default.aspx"--a search page. You don't see the redirects (specifically to a Login.aspx page--which redirects back to default.aspx). I can get the search page with either Firefox or wget--and on the same computer that I'm writing the Java code on. So, Firefox and wget are doing something that my code isn't. Also, I'm not behind a proxy.

I've searched about the redirect exception, and one or two pages blame poor website development. That may be true, but I don't have any control over the website. So, fixing the website is not an option.

I did find this page where someone has the same issue. I used some code given in one of the responses to discover the default.aspx->Login.aspx->default.aspx redirection loop.

Much of my code was pulled from the Working with URLs and Working with Cookies tutorials from Oracle. I tried adding the cookie handler thinking that maybe Login.aspx was trying to create a session ID or some other connection-specific identifier. But either cookies are not the solution OR I just didn't code it the right way.

[Code]...

After more searching, I'm 99% certain it's a cookie-handling issue. I added some more code (not included in the above) that examines the full response from the redirect to the Login.aspx page. The response includes a Set-Cookie header for "ASP.NET_SessionId". Now to find some code that will store and send the session ID.

View 1 Replies View Related

General :: Setting Timeout Time For TCP Sockets?

Jun 8, 2011

I have written simple TCP server-client programs in 'C' on my RHEL 5 64 bit.I want to add SEND and RECEIVE timeout for this socket; so that if server is not responding in given time, request will get timeout instead of waiting in "recv" call.But I failed to do so.

View 6 Replies View Related

Networking :: Limitof UDP Sockets We Can Bind At Same Time In Fedora Core X64 ?

Jan 18, 2011

During the development of a java application appearantly found that cannot bind more than 500 UDP sockets at the same time.

The developed java application is running on Fedora Core (x64)

Is there some procedure to check how many sockets I can bind at the same time on that linux distribution?

In case the limit exists, can it be increased easily?

$ uname -a result is :

View 2 Replies View Related

General :: Access Time For Ramdisk Is Not As Fast As Expected?

Feb 18, 2010

I am trying to use the Linux Ramdisk y machine and followed the instructions oninux/Ramdisk/ramdisk.html to create a 4GB ramdisk (total memory is 8GB, linux 2.6.9)The issue is that it is taking me almost exactly the same time to read a 1GB file from ramdisk as it is from disk. I was expecting it to be atleast twice as fast.Has anyone encountered this before?

View 1 Replies View Related

Programming :: Use Curl And Spawn Multiple Connection At A Time?

Jan 24, 2010

I am using a perl script which uses curl in the background to download files from rapidshare premium,one file at a time. I wanted to know is it possible to use curl and spawn multiple connection at a time,to download the same file in multiple parts?? I don't seem to find an option in curl which does that.

View 1 Replies View Related

Networking :: Detecting Broken Connection Before Sending Data With Sockets?

Oct 28, 2010

I am writing a code in Python where a socket client changes data with the server. That works nice if the connection is up. However it is also supposed to work offline. So I need to be able to detect if the connection is up before sending data, but I was not able to do so. A summary of the code is like that:

Code:
try:
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect( (self.host, self.port) )
connected = True
except:
connected = False

if connected:
data = "some data byte"
try:
socket.send(data)
except:
connected=False
socket.close()

If I unplug the cable after the connection is ready then the socket sends data and does not detect the connection failure. What is amazing is that the client detects the connection failure just after the cable has been plugged again. Of course there is a loop in the code above and always that connected==False a new connection is made. How could the program detect the connection failure before sending data and then lead the code to an exception?

View 3 Replies View Related

Programming :: Write A Bash Script To Time Some Downloads From A Server Using Ftp Connection?

Jun 8, 2010

I write a bash script to time some downloads from a server using ftp connection. ( something like: "time ftp 'options' ) I need to count the time for a list of files in a loop and output the result in a file.

View 1 Replies View Related

Ubuntu :: GUI Taking Long Time To Load?

May 3, 2010

in ubuntu 10.04 After logging in t All I had was the wallpaper & my widgets for around a minute, and then the usual upper and lower panels appeared.. didnt had this problem in 9.10

View 4 Replies View Related

Programming :: Set Period Of Time To Tcp Connection To Wait For Request Or Respond For Tcp Block Read

Feb 27, 2010

I wanted to know how can I set a period of time to a tcp connection to wait for request or respond for tcp block read. which system call or function I can use? Does any body know a very simple quick and easy reference on web for socket programing that has lots of socket programing examples in it?

View 1 Replies View Related

Programming :: PING Using Raw Sockets In C?

Nov 18, 2010

Is there any way to implement a simple ping script in C (unix)? I'm programming simple OpenWRT scripts.

I have found some examples of ping in C:

[URL]

However, nothing happens, nothing is sent.

When I look at the code, in the portion where the socket is created, I can see that the socket is not binding to any interface:

Code:
if ((sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) == -1)
{
perror("socket");
exit(EXIT_FAILURE);
}
setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &optval, sizeof(int));

Instead, it uses "setsockopt" to set some options.

My guess is that it is trying to send packets over the eth0 interface instead over the wl0 (wireless) interface (which is the one I want to use to send pings).

Now, my question is: Is there any other way to send pings in C by binding to an interface?

View 1 Replies View Related

Debian Installation :: Apt Taking A Long Time To Configure

Jul 15, 2010

while installation of debian 5 from small cd ... does configuring apt take a lot of time!!! installing debian for the first time.

View 1 Replies View Related

Ubuntu Installation :: GDM Taking Long Time To Come Up After Updates?

Mar 26, 2010

I have just made a clean install of Ubuntu 9.10 and after installing all updates, GDM is taking a long time (about one minute) to come up after a clean boot, resulting in a regular console prompt.

If I issue "sudo service gdm start" it does come up promptly.

What can I do? Where can I see startup logs to try and identify any problems?

View 5 Replies View Related

Ubuntu :: 10.10 Taking Longer Time (90 Seconds) To Boot

Nov 7, 2010

My ubuntu(10.10) installation takes a relatively longer time (90 seconds) to boot. I think part of the problem might be related to an error message during boot related to usb drivers.
Code:
[2.717076] usb 4-1: new low speed USB device using ohci_hcd and address 2
[3.244051] usb 4-2: new full speed USB device using ohci_hcd and address 3
[12.029046] /build/buildd/linux-2.6.35/drivers/hid/usbhid/hid-core.c: usb_submit_urb(ctrl) failed
I have attached the relevant part of dmesg output also.

View 6 Replies View Related

Ubuntu :: BZ2 Compression Surely Taking Long Time

Dec 8, 2010

I compressed a directory containing many image files. The directory amounted to 5.3gig. Compressed with TAR using .tgz the compression took a couple minutes at most and compressed down to 4.3 gig. Compressed using .bz2 the compression took about 90 minutes and compressed down to 4.2 gig. Hardly worth the extra time. Do these numbers look normal to you?

View 1 Replies View Related

Ubuntu :: Taking A Long Time To Start Up Programs?

Jan 3, 2011

I don't know if it is just me but it seems like Ubuntu takes a long time to start up programs. For example, it takes me 10 seconds to start up "Ubuntu software center". My computer is a relatively fast one. It has 4 gb of ram and an intel core duo processor. I didn't install that many programs. Does anyone know what might be the source of the problem and how to fix it?

View 6 Replies View Related

General :: Script Taking Long Time To Execute?

Jan 25, 2011

Quote:

#!/bin/ksh
DBcounttry_finalnofunc()
{

[code]....

View 6 Replies View Related

Software :: K3b - Copying Commercial DVD - Taking A Long Time

Jul 24, 2011

I purchased a special collection boxed Superman set for my 10 year old daughter in May for her birthday and recently some second hand Zumba DVD's. My daughter is quite hard on DVD's. So I have as asked her to wait whilst I have them copied.

I will be using the Zumba regularly and know they will suffer so want use copies and save the originals.

I have done some reading and I think I have everything installed correctly.

I tried K9copy, but it immediately closed. I then tried K3b and noticed I needed 99GB of space. (I wonder if that is why K9copy closed?) The only thing I have that big is my backup external drive.

So I connected it up. I only had about 44 GB of space on it. I ticked for half the tracks which needed less space. So now there was enough space. I then clicked on rip DVD. It has been doing it continuously for 2 nights and is up to 24%.

So at this rate it will take a week to copy half a DVD to my drive and then I have to burn it to a DVD. This can't be right, can it?

I am running OpenSuse 11.3

View 5 Replies View Related

Programming :: C/C++ - Program Detecting New Sockets

Jul 25, 2010

I need to create a C/C++ program in Linux that succeeds in detecting how many tcp-sockets and what tcp-sockets are created by the other processes in the system in a particular time interval (e.g., the interval time this application is running in). Then, I'd need to get some information like local/remote port number and local/remote ip address of each of these sockets.

View 8 Replies View Related

Programming :: How To Use Sockets To Display GUI At Server End

Aug 27, 2010

I am struggling a little on how to best approach this problem. I have wrote a server program that runs via xinetd, that obviously spits out data at the client end. Fairly straightforward stuff?There is a point in my server code where I need to display an image/gui i.e something that runs on X11 that prompts a user to perform a task on the display connected at the the server side.So far I have written a test program that displays some text at the client end and then launches the browser at the server end. I have also set the following export. Code: export DISPLAY=:0 and then goes on to launch my web browser. Works great when ran locally on the server and when I remotely telnet in to the server and run the code.

However when I try to run the same piece of code as a xinetd service the export seems to have zero affect and the client terminal window displays errors associated with there not being a X11 server running.The code launches fine when I create a socket to serverip:6556 it just the ability to display gui programs to another display that does not seem to be working.

View 5 Replies View Related

Programming :: Send A Packet Through Sockets C++

Feb 1, 2011

Can someone help me with this problem,trying to send a packet,using tcp/ip,the packet should look like this:

Code:
field 1: SOCKS protocol version, 1 byte (0x05 for this version)
field 2: status, 1 byte:
0x00 = request granted
0x01 = general failure
0x02 = connection not allowed by ruleset
0x03 = network unreachable
0x04 = host unreachable
0x05 = connection refused by destination host
0x06 = TTL expired
0x07 = command not supported / protocol error
0x08 = address type not supported
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
0x01 = IPv4 address
0x03 = Domain name
0x04 = IPv6 address
field 5: destination address of
4 bytes for IPv4 address
1 byte of name length followed by the name for Domain name
16 bytes for IPv6 address
field 6: network byte order port number, 2 bytes
and this is my code:

Code:
int domainLen = strlen(domain);
char reply[domainLen + 7];
reply[0] = 5; // version
reply[1] = 0; // succed
reply[2] = 0; // reserved
reply[3] = 3; // its a domain
reply[4] = domainLen;; // lenght of domain
for(int j = 0; j < domainLen; ++j)
{
reply[j + 5] = domain[j];
}
reply[5 + domainLen] = 80; // port
reply[20] = '�';
Send(reply, sizeof(reply));
domain is "www.google.com". Am I doing it right ? I dont know much about bits.

View 6 Replies View Related

General :: Taking Time To Load & Doesn't Shutdown Completely?

Dec 1, 2010

i have installed ubuntu ultimate edition 10.04 in my toshiba c650 recently,however it is taking too long before it startup. 2 when i log off the cursor still remain untill all power have been discharged. what could be the problem

View 5 Replies View Related

Server :: Seems That The Rm -rf And Cp -a Commands Are Taking A Long Time To Complete In What Should Be Short?

Jun 10, 2010

I am backing up data from a remote server onto a local ntfs partition. It seems that the rm -rf and cp -a commands are taking a long time to complete in what should be short, incremental backups.Has anyone had similar problems when backing up to an ntfs partitionHere is my rsnapshot.conf:

Code:
#################################################
# rsnapshot.conf - rsnapshot configuration file #

[code]....

View 5 Replies View Related

CentOS 5 Server :: Website Taking Long Time To Load?

May 27, 2010

I am using KVM and created four guest Operating systems on it.The server host is Ubuntu 10.04.I am using 4 websites in a reverse proxy environment.One of our website is running on CentOS VM.Right now there is no traffic on the website static HTML pages.I do not have any clue as why it was taking longer time to be accessed.

View 2 Replies View Related

Ubuntu :: Basic Graphic Actions Taking Long Occurrence Time

Jul 8, 2010

It takes an exceptionally long time for basic graphic actions to occur like switching tabs in Firefox, redrawing windows that have been (un)maximized/minimized, and switching between windows. My video card is not a bad one, a GeForce 9500 GT and Windows handles it just fine. I'm using the current NVIDIA drivers 265.35. It seems like if I can't get some better response time I'll be using Windows much more.

View 3 Replies View Related

Ubuntu Security :: .encryptfs Folder Is Taking Up So Much Space - Getting Notifications Every Time Log In

May 20, 2011

When I reinstalled ubuntu I chose to encrypt my home folder (something that i've never done before) but now that I know it doesn't really make a difference i'd like to decrypt it because the .encryptfs folder is taking up so much space i'm getting notifications every time I log in.

View 7 Replies View Related

Programming :: Parallel Data Transfer Using Sockets

Feb 25, 2011

I am doing a project where 2 clients connect to server and communicate (chat) and transfer data one after other using sockets. I have working code for this in C language. Now our main aim is to create a communication link where two clients transfer multiple streams data parallely. To be more precise i want to transfer images files and audio files parallel at same time, so is it possible to send data parallel using one socket connection?

View 3 Replies View Related

Programming :: Creating 2 Sockets In Client / Server?

Jun 9, 2010

I have a problem creating my second socket in client file. the program was running well but when I try to add another socket to connect to the same server, I got a problem connecting to the first socket! it doesn't make sense. the original code was:

sockfd[i] = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd[i] < 0) error("(MAIN) - Error openning socket 1");
port_num[i] = portno;
bzero((char*) &serv_addr[i], sizeof(serv_addr[i]));

[Code].....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved