(RunLoop _mode_2_fd_speakers): New ivar.

([RunLoop]): Added new methods for notification of readiness of file
descriptors for reading and writing.  Done by
Richard Frith-Macdonald <richard@brainstorm.co.uk>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1889 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1996-10-31 17:53:55 +00:00
parent fab2728036
commit 75acc961d3

View file

@ -13,6 +13,7 @@
NSMapTable *_mode_2_timers;
NSMapTable *_mode_2_in_ports;
NSMapTable *_mode_2_fd_listeners;
NSMapTable *_mode_2_fd_speakers;
}
- (void) addPort: port
@ -46,10 +47,34 @@
/* Mode strings. */
extern id RunLoopDefaultMode;
/* xxx This interface will probably change. */
/*
* GNUstep specific extensions to the RunLoop class
* xxx This interface will probably change.
*/
@protocol FdListening
- (void) readyForReadingOnFileDescriptor: (int)fd;
@end
@protocol FdSpeaking
- (void) readyForWritingOnFileDescriptor: (int)fd;
@end
@interface RunLoop (GNUstepExtensions)
/* Register an object (listener) to receive 'readyForReadingOnFileDescriptor:'
message whenever the descriptor (fd) is readable. */
- (void) addReadDescriptor: (int)fd
object: (id <FdListening>)listener
forMode: (id <String>)mode;
/* Register an object (speaker) to receive 'readyForWritingOnFileDescriptor:'
message whenever the descriptor (fd) is writable. */
- (void) addWriteDescriptor: (int)fd
object: (id <FdSpeaking>)speaker
forMode: (id <String>)mode;
- (void) removeReadDescriptor: (int)fd
forMode: (id <String>)mode;
- (void) removeWriteDescriptor: (int)fd
forMode: (id <String>)mode;
@end
/* xxx This interface will probably change. */
@interface NSObject (OptionalPortRunLoop)