1 /****************************************************************************** 2 Copyright (c) 1995, 1996 Xerox Corporation. All rights reserved. 3 Portions of this code were written by Stephen White, aka ghond. 4 Use and copying of this software and preparation of derivative works based 5 upon this software are permitted. Any distribution of this software or 6 derivative works must comply with all applicable United States export 7 control laws. This software is made available AS IS, and Xerox Corporation 8 makes no warranty about the software, its performance or its conformity to 9 any specification. Any person obtaining a copy of this software is requested 10 to send their name and post office or electronic mail address to: 11 Pavel Curtis 12 Xerox PARC 13 3333 Coyote Hill Rd. 14 Palo Alto, CA 94304 15 Pavel@Xerox.Com 16 *****************************************************************************/ 17 18 #ifndef Net_Multi_H 19 #define Net_Multi_H 1 20 21 /* Extra networking facilities available only for the multi-user networking 22 * configurations. 23 */ 24 25 typedef void (*network_fd_callback) (int fd, void *data); 26 27 extern void network_register_fd(int fd, network_fd_callback readable, 28 network_fd_callback writable, void *data); 29 /* The file descriptor FD will be selected for 30 * at intervals (whenever the networking module 31 * is doing its own I/O processing). If FD 32 * selects true for reading and READABLE is 33 * non-zero, then READABLE will be called, 34 * passing FD and DATA. Similarly for 35 * WRITABLE. 36 */ 37 38 extern void network_unregister_fd(int fd); 39 /* Any existing registration for FD is 40 * forgotten. 41 */ 42 43 extern int network_set_nonblocking(int fd); 44 /* Enable nonblocking I/O on the file 45 * descriptor FD. Return true iff successful. 46 */ 47 48 #endif /* !Net_Multi_H */ 49 50 /* 51 * $Log: net_multi.h,v $ 52 * Revision 1.3 1998/12/14 13:18:32 nop 53 * Merge UNSAFE_OPTS (ref fixups); fix Log tag placement to fit CVS whims 54 * 55 * Revision 1.2 1997/03/03 04:19:06 nop 56 * GNU Indent normalization 57 * 58 * Revision 1.1.1.1 1997/03/03 03:45:04 nop 59 * LambdaMOO 1.8.0p5 60 * 61 * Revision 2.1 1996/02/08 06:18:14 pavel 62 * Updated copyright notice for 1996. Release 1.8.0beta1. 63 * 64 * Revision 2.0 1995/11/30 05:07:18 pavel 65 * New baseline version, corresponding to release 1.8.0alpha1. 66 * 67 * Revision 1.1 1995/11/30 05:07:10 pavel 68 * Initial revision 69 */ 70