ObjFW  Check-in [e8c1757fb8]

Overview
Comment:Windows calls it WSAENOTCONN.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e8c1757fb837375cced3e7854832407e88e7424cbde2eb2eac1514f225fe1069
User & Date: js on 2011-01-11 19:46:03
Other Links: manifest | tags
Context
2011-01-11
19:59
Add +[sleepUntilDate:] to OFDate. (check-in: 3fbc337547 user: js tags: trunk)
19:46
Windows calls it WSAENOTCONN. (check-in: e8c1757fb8 user: js tags: trunk)
2011-01-08
16:05
Fix two FIXMEs. (check-in: 202daae1d1 user: js tags: trunk)
Changes

Modified src/OFStreamSocket.m from [62e35b4e2c] to [57b1d6b16e].

69
70
71
72
73
74
75

76



77
78
79
80
81
82
83
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87







+

+
+
+







		@throw [OFNotConnectedException newWithClass: isa];

	if (eos) {
		OFReadFailedException *e;

		e = [OFReadFailedException newWithClass: isa
					  requestedSize: size];
#ifndef _WIN32
		e->errNo = ENOTCONN;
#else
		e->errNo = WSAENOTCONN;
#endif

		@throw e;
	}

	if ((ret = recv(sock, buf, size, 0)) < 0)
		@throw [OFReadFailedException newWithClass: isa
					     requestedSize: size];
97
98
99
100
101
102
103

104



105
106
107
108
109
110
111
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119







+

+
+
+







		@throw [OFNotConnectedException newWithClass: isa];

	if (eos) {
		OFWriteFailedException *e;

		e = [OFWriteFailedException newWithClass: isa
					   requestedSize: size];
#ifndef _WIN32
		e->errNo = ENOTCONN;
#else
		e->errNo = WSAENOTCONN;
#endif

		@throw e;
	}

	if ((ret = send(sock, buf, size, 0)) == -1)
		@throw [OFWriteFailedException newWithClass: isa
					      requestedSize: size];