@@ -27,35 +27,42 @@ * Headers for Win32 * * These must be imported after objc/Object and thus OFObject! */ #ifdef _WIN32 +#define _WIN32_WINNT 0x0501 #import #import #endif /** * The OFTCPSocket class provides functions to create and use sockets. */ @interface OFTCPSocket: OFObject { +#ifndef _WIN32 int sock; +#else + SOCKET sock; +#endif struct sockaddr *saddr; socklen_t saddr_len; } +/** + * This needs to be called before any socket can be used. + */ ++ (void)startup; + /** * Initializes an already allocated OFTCPSocket. * * \return An initialized OFTCPSocket */ - init; - free; -- setSocket: (int)socket; -- setSocketAddress: (struct sockaddr*)sockaddr - withLength: (socklen_t)len; /** * Connect the OFTCPSocket to the specified destination. * * \param host The host or IP to connect to