ObjFW  Diff

Differences From Artifact [572eeb8e96]:

To Artifact [ef35b95705]:


44
45
46
47
48
49
50







51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

67
68
69
70
71
72
73

/**
 * This callback is called when a stream did get ready for writing.
 *
 * \param stream The stream which did become ready for writing
 */
- (void)streamDidBecomeReadyForWriting: (OFStream*)stream;







@end

/**
 * \brief A class that can observe multiple streams at once.
 */
@interface OFStreamObserver: OFObject
{
	OFMutableArray *readStreams;
	OFMutableArray *writeStreams;
	id <OFStreamObserverDelegate> delegate;
#ifdef OF_HAVE_POLL
	OFDataArray *fds;
	OFMutableDictionary *fdToStream;
#else
	fd_set readfds;
	fd_set writefds;

	int nfds;
#endif
}

#ifdef OF_HAVE_PROPERTIES
@property (retain) id <OFStreamObserverDelegate> delegate;
#endif







>
>
>
>
>
>
>
















>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81

/**
 * This callback is called when a stream did get ready for writing.
 *
 * \param stream The stream which did become ready for writing
 */
- (void)streamDidBecomeReadyForWriting: (OFStream*)stream;

/**
 * This callback is called when an exception occurred on the stream.
 *
 * \param stream The stream on which an exception occurred
 */
- (void)streamDidReceiveException: (OFStream*)stream;
@end

/**
 * \brief A class that can observe multiple streams at once.
 */
@interface OFStreamObserver: OFObject
{
	OFMutableArray *readStreams;
	OFMutableArray *writeStreams;
	id <OFStreamObserverDelegate> delegate;
#ifdef OF_HAVE_POLL
	OFDataArray *fds;
	OFMutableDictionary *fdToStream;
#else
	fd_set readfds;
	fd_set writefds;
	fd_set exceptfds;
	int nfds;
#endif
}

#ifdef OF_HAVE_PROPERTIES
@property (retain) id <OFStreamObserverDelegate> delegate;
#endif