 
     public func setOption(option: Int32, value: Int32) {
         var val = value
-        setsockopt(rawDescriptor, SOL_SOCKET, option, &val, socklen_t(sizeof(Int32)))
+        setsockopt(rawDescriptor, SOL_SOCKET, option, &val, socklen_t(sizeof(Int32.self)))
     }
 }
 

    public func bindAddress(address: SocketAddress) throws {
        var mutable = address
        let result = mutable.withUnsafeMutablePointer { pointer in
            return bind(self.rawDescriptor, pointer, socklen_t(UInt8(sizeof(sockaddr_in))))
        }
        if result != 0 {
            throw SocketError.GenericError(code: result)


    public func acceptClient() throws -> (Socket, SocketAddress) {
        var addr = sockaddr_in()
        var addrlen = socklen_t(sizeof(socklen_t.self))
        let wrapper = { (addrPtr: UnsafeMutablePointer<()>, addrlenPtr: UnsafeMutablePointer<socklen_t>) -> Int32 in
            return accept(self.rawDescriptor, UnsafeMutablePointer<sockaddr>(addrPtr), addrlenPtr)
        }
