LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-01-2008, 01:45 AM   #1
kkpal
Member
 
Registered: Oct 2007
Posts: 101

Rep: Reputation: 15
Thumbs up how to reduce time out time for "connect"


hi all

I am using
int connect(int socket, const struct sockaddr *address,socklen_t address_len);

its taking to much time for displaying message
"Unable to connect to remote host: Connection timed out"
I want to set time out time for 5 sec only. How can I do this?
 
Old 02-02-2008, 03:02 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 75
Look at using setsockopt() with the SO_RCVTIMEO and SO_SNDTIMEO options.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Have to "poff" and then "pon" every time at startup seish Linux - Networking 1 11-09-2007 03:48 AM
"My posts" and "My threads" should be exempt from the wait time before searches vharishankar LQ Suggestions & Feedback 6 03-06-2006 09:10 PM
Where to download precompiled bash binaries, such as "time" and "top"? elinuxqs Linux - Newbie 12 11-14-2005 09:36 PM
"Connect Internet Once In A Life Time"(MD 10.1 so call offical) nitin403 Mandriva 4 08-17-2005 10:59 AM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-07-2005 12:44 AM


All times are GMT -5. The time now is 04:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration