home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / protocol / tcpip / 5915 < prev    next >
Encoding:
Text File  |  1993-01-11  |  1.2 KB  |  28 lines

  1. Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!bb3.andrew.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!aw2t+
  3. Newsgroups: comp.protocols.tcp-ip
  4. Message-ID: <4fIN9KG00iV3M1hYsF@andrew.cmu.edu>
  5. Date: Mon, 11 Jan 1993 10:29:26 -0500 
  6. From: "Alex R.N. Wetmore" <aw2t+@andrew.cmu.edu>
  7. Subject: call routine when packet arrives?
  8. Lines: 18
  9.  
  10. I was wondering if there is any way to have standard bsd sockets
  11. automatically call a routine when a packet arrives (sort of like what
  12. signal() does for signals).  Basically, I have a program that isn't
  13. event driven, but I would like for it to be able to get interrupted when
  14. certain packets arrive (it is for a bbs, and I need to use it for system
  15. messages, talk pages, etc).  I used to implement them using signals, but
  16. since I am moving to a client/server model, and the client can be on a
  17. different machine, I can't use signals anymore.
  18.  
  19. Otherwise, I could implement the packet waiting routine in where the
  20. program waits for keystrokes, but I don't see a way of doing that
  21. without polling (which means high cpu usage).
  22.  
  23. any ideas?
  24.  
  25. alex
  26.  
  27.  
  28.