Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!cornell!uw-beaver!mit-eddie!ll-xn!ames!ucbcad!ucbvax!MACOM4.ARPA!brady From: brady@MACOM4.ARPA (Sean Brady) Newsgroups: comp.protocols.tcp-ip Subject: Re: Asyncio on Sockets Message-ID: <8707070445.AA04813@MACOM4.ARPA> Date: Tue, 7-Jul-87 00:45:58 EDT Article-I.D.: MACOM4.8707070445.AA04813 Posted: Tue Jul 7 00:45:58 1987 Date-Received: Wed, 8-Jul-87 06:18:28 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 37 In reference to your question, we are using asynch io through raw sockets on Sun3's (under release 3.2), and have had little problems getting things going once the initial slugging is done. If you look in the documentation, you will be hopelessly confused unless you take the time to play with it for a bit. This is how we set up a asynch io socket under suntools (another confusing beast): make_my_socket(proto) int proto; { int s; if ((s = socket(AF_INET, SOCK_RAW, proto)) < 0) { perror("socket"); } fcntl(s, F_SETFL, FASYNC); fcntl(s, F_SETOWN, pktpid); (void) notify_set_input_func(frame, process, s); return(s); } where pktpid is the process id that is setting up the socket. If you are outside the suntools environment, just substitute a signal(SIGIO,process); for the notify_set_input_func(bla...bla), where process is your socket reader. That should give you a live socket that interupts when a packet of type "socket" arrives. You could then use the "recvfrom" call to read from and the "sendto" call to write to the socket created. Hope this helps... -Sean (He who Laughs, Lasts) *********************************************************************** "Mistakes are often the stepping stones to utter failure."