55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
-
+
-
|
OFTCPSocket *sock = [OFTCPSocket socket];
if (URL.port == nil) {
[of_stderr writeLine: @"Need a port!"];
[OFApplication terminateWithStatus: 1];
}
[sock connectToHost: URL.host
[sock connectToHost: URL.host port: URL.port.shortValue];
port: URL.port.shortValue];
return [OFPair pairWithFirstObject: sock
return [OFPair pairWithFirstObject: sock secondObject: sock];
secondObject: sock];
}
[of_stderr writeFormat: @"Invalid protocol: %@\n", scheme];
[OFApplication terminateWithStatus: 1];
abort();
}
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
134
135
136
137
138
139
140
141
142
143
144
145
146
|
-
+
-
|
return false;
}
for (OFPair *pair in _streams) {
if (pair.firstObject == stream)
continue;
[pair.secondObject writeBuffer: buffer
[pair.secondObject writeBuffer: buffer length: length];
length: length];
}
return true;
}
@end
|