ObjFW  Diff

Differences From Artifact [24f92d1402]:

To Artifact [2a532fea1c]:


23
24
25
26
27
28
29

30
31

32
33
34
35
36
37
38
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40







+


+







#ifndef _WIN32
# include <sys/types.h>
# include <sys/socket.h>
#endif

#import "OFStreamSocket.h"

#import "OFInitializationFailedException.h"
#import "OFNotConnectedException.h"
#import "OFReadFailedException.h"
#import "OFSetOptionFailedException.h"
#import "OFWriteFailedException.h"

#ifndef INVALID_SOCKET
# define INVALID_SOCKET -1
#endif

#ifdef _WIN32
134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







- (void)setBlocking: (BOOL)enable
{
	u_long v = enable;
	isBlocking = enable;

	if (ioctlsocket(sock, FIONBIO, &v) == SOCKET_ERROR)
		@throw [OFSetOptionFailedException newWithClass: isa
							 stream: stream];
							 stream: self];
}
#endif

- (int)fileDescriptor
{
	return sock;
}