| | |
Linux Network Programming - custom timeout value for a TCP socket?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 21
Reputation:
Solved Threads: 3
From Beej's Guide to Network Programming:
I'm interested in implementing a socket timeout using setitimer(), is there any sample code that does that? Thanks.
•
•
•
•
How can I set a custom timeout value for a TCP or UDP socket?
It depends on your system. You might search the net for SO_RCVTIMEO and SO_SNDTIMEO (for use with setsockopt()) to see if your system supports such functionality.
The Linux man page suggests using alarm() or setitimer() as a substitute.
![]() |
Other Threads in the C++ Forum
- Previous Thread: Linked List study material
- Next Thread: C++ Memory game help needed
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets





