LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 04-02-2009, 02:00 AM   #1
vtstmn
LQ Newbie
 
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Semaphore for UDP socket


Hi all,

I'd like to know if it's possible to have the following behaviour with a UDP socket.
1. Have a thread waiting for data to read on the socket.
2. Increase a semaphore each time a new packet arrives.
3. Have another thread waiting on the semaphore and reading one and only one packet for each count of the semaphore.

The problem with select is that it wakes up as long as data is available for reading, and not only when a new packet arrives.
Can epoll help me in doing that (I can't figure out from the man pages)?

Thanks.
 
  


Reply



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
UDP Socket Connection citiz3n Linux - Networking 2 05-26-2008 07:48 PM
Poll() and UDP socket krizzz Programming 4 06-06-2006 10:55 AM
could not listen on UDP socket: address in use peaceofcrap2001 Linux - Networking 2 07-10-2004 12:18 PM
How to receive UDP and ICMP packets, by one UDP socket(PMTUD) myself_rajat Linux - Networking 0 05-28-2004 05:43 AM
Using Raw Socket for UDP myself_rajat Linux - Networking 0 05-17-2004 03:35 AM

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

All times are GMT -5. The time now is 02:23 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