@@ -195,10 +195,12 @@ } @end #endif @implementation OFTCPSocket +@synthesize SOCKS5Host = _SOCKS5Host, SOCKS5Port = _SOCKS5Port; + + (void)setSOCKS5Host: (OFString*)host { id old = defaultSOCKS5Host; defaultSOCKS5Host = [host copy]; [old release]; @@ -232,10 +234,17 @@ @throw e; } return self; } + +- (void)dealloc +{ + [_SOCKS5Host release]; + + [super dealloc]; +} - (void)close { [super close]; @@ -245,37 +254,10 @@ _port = 0; } #endif } -- (void)dealloc -{ - [_SOCKS5Host release]; - - [super dealloc]; -} - -- (void)setSOCKS5Host: (OFString*)SOCKS5Host -{ - OF_SETTER(_SOCKS5Host, SOCKS5Host, true, 1) -} - -- (OFString*)SOCKS5Host -{ - OF_GETTER(_SOCKS5Host, true) -} - -- (void)setSOCKS5Port: (uint16_t)SOCKS5Port -{ - _SOCKS5Port = SOCKS5Port; -} - -- (uint16_t)SOCKS5Port -{ - return _SOCKS5Port; -} - - (void)connectToHost: (OFString*)host port: (uint16_t)port { OFString *destinationHost = host; uint16_t destinationPort = port;