340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
}
- (void)setKeepAlivesEnabled: (BOOL)enable
{
int v = enable;
if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v)))
@throw [OFSetOptionFailedException newWithClass: isa];
}
- (OFString*)remoteAddress
{
if (sockAddr == NULL || sockAddrLen == 0)
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
|
|
>
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
|
}
- (void)setKeepAlivesEnabled: (BOOL)enable
{
int v = enable;
if (setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (char*)&v, sizeof(v)))
@throw [OFSetOptionFailedException newWithClass: isa
stream: self];
}
- (OFString*)remoteAddress
{
if (sockAddr == NULL || sockAddrLen == 0)
@throw [OFInvalidArgumentException newWithClass: isa
selector: _cmd];
|