LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-01-2005, 06:39 AM   #1
blackhole123
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Rep: Reputation: 0
Drop connection on timeout


Hello all,

I have a TCP server which does some sort of handshaking with client on connect().

after connect(), i force the client to send some key, if the key is not reached with in a time interval i want the server to drop the connection.

But the problem is that when is use recv() it will be blocking, so how to setup the timer that fires and closes the socket FD.

accept()
starttimer_thread() //spans a thread that checks for the rec flag

recv()

//on recv successfull, set flag
flag=1
 
  


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
Drop connections to port 80 at firewall machine also drop at protected network? Niceman2005 Linux - Security 2 10-27-2005 09:21 AM
Hotplug event drop my intrnet connection! Nik0s Linux - Networking 12 01-25-2004 03:11 PM
90 second timeout on new connection mikewelter Linux - General 1 10-08-2003 06:18 PM
Need help : PPP will not drop connection cpalkar Linux - Networking 1 09-18-2003 10:03 PM
Connection Timeout Nezar Linux - Networking 1 07-01-2001 02:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:32 AM.

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
Open Source Consulting | Domain Registration