home *** CD-ROM | disk | FTP | other *** search
- Organization: Sophomore, Math/Computer Science, Carnegie Mellon, Pittsburgh, PA
- 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+
- Newsgroups: comp.protocols.tcp-ip
- Message-ID: <4fIN9KG00iV3M1hYsF@andrew.cmu.edu>
- Date: Mon, 11 Jan 1993 10:29:26 -0500
- From: "Alex R.N. Wetmore" <aw2t+@andrew.cmu.edu>
- Subject: call routine when packet arrives?
- Lines: 18
-
- I was wondering if there is any way to have standard bsd sockets
- automatically call a routine when a packet arrives (sort of like what
- signal() does for signals). Basically, I have a program that isn't
- event driven, but I would like for it to be able to get interrupted when
- certain packets arrive (it is for a bbs, and I need to use it for system
- messages, talk pages, etc). I used to implement them using signals, but
- since I am moving to a client/server model, and the client can be on a
- different machine, I can't use signals anymore.
-
- Otherwise, I could implement the packet waiting routine in where the
- program waits for keystrokes, but I don't see a way of doing that
- without polling (which means high cpu usage).
-
- any ideas?
-
- alex
-
-
-