Index: src/OFUDPSocket.h ================================================================== --- src/OFUDPSocket.h +++ src/OFUDPSocket.h @@ -13,10 +13,11 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #import "OFObject.h" +#import "OFKernelEventObserver.h" #import "socket.h" /*! @file */ @@ -36,11 +37,12 @@ * port pair and @ref hostForAddress:port: to get the host / port pair for an * address. If you want to compare two addresses, you can use * @ref of_udp_socket_address_equal and you can use * @ref of_udp_socket_address_hash to get a hash to use in e.g. @ref OFMapTable. */ -@interface OFUDPSocket: OFObject +@interface OFUDPSocket: OFObject { int _socket; } /*! Index: src/OFUDPSocket.m ================================================================== --- src/OFUDPSocket.m +++ src/OFUDPSocket.m @@ -282,10 +282,20 @@ if (sendto(_socket, buffer, length, 0, (struct sockaddr*)&receiver->address, receiver->length) < length) @throw [OFWriteFailedException exceptionWithObject: self requestedLength: length]; } + +- (int)fileDescriptorForReading +{ + return _socket; +} + +- (int)fileDescriptorForWriting +{ + return _socket; +} - (void)close { if (_socket == INVALID_SOCKET) @throw [OFNotConnectedException exceptionWithSocket: self];