Differences From Artifact [dc50295dfd]:
- File
src/OFTCPSocket.m
— part of check-in
[13ee56edf3]
at
2014-06-21 21:43:43
on branch trunk
— Move all macros from OFObject.h to macros.h
This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. (user: js, size: 11063) [annotate] [blame] [check-ins using]
To Artifact [e59925afa4]:
- File
src/OFTCPSocket.m
— part of check-in
[c6a4b0a95f]
at
2014-08-18 10:53:56
on branch trunk
— OFTCPSocket: Clear read buffer for new connection
This prevents reading old data when closing and reconnecting the socket. (user: js, size: 11203) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 | * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #define __NO_EXT_QNX #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> | > > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | * * Alternatively, it may be distributed under the terms of the GNU General * Public License, either version 2 or 3, which can be found in the file * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #define OF_TCP_SOCKET_M #define __NO_EXT_QNX #include "config.h" #include <stdio.h> #include <stdlib.h> #include <string.h> |
︙ | ︙ | |||
267 268 269 270 271 272 273 274 275 276 277 278 279 280 | OFString *destinationHost = host; uint16_t destinationPort = port; of_resolver_result_t **results, **iter; if (_socket != INVALID_SOCKET) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; if (_SOCKS5Host != nil) { /* Connect to the SOCKS5 proxy instead */ host = _SOCKS5Host; port = _SOCKS5Port; } results = of_resolve_host(host, port, SOCK_STREAM); | > > > > > > > | 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | OFString *destinationHost = host; uint16_t destinationPort = port; of_resolver_result_t **results, **iter; if (_socket != INVALID_SOCKET) @throw [OFAlreadyConnectedException exceptionWithSocket: self]; _listening = false; /* Make sure to clear the read buffer in case the socket is reused */ [self freeMemory: _readBuffer]; _readBuffer = NULL; _readBufferLength = 0; if (_SOCKS5Host != nil) { /* Connect to the SOCKS5 proxy instead */ host = _SOCKS5Host; port = _SOCKS5Port; } results = of_resolve_host(host, port, SOCK_STREAM); |
︙ | ︙ | |||
511 512 513 514 515 516 517 | return ret; } - (bool)isListening { return _listening; } | < < < < < < < | 520 521 522 523 524 525 526 527 | return ret; } - (bool)isListening { return _listening; } @end |