tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

C# example uses volatile? #2425

Closed wrharper-AASP closed 1 year ago

wrharper-AASP commented 1 year ago

Is this required? This can actually reduce performance. Is this somehow being handled by the C++ library? I would like details on why this is being used.

wrharper-AASP commented 1 year ago

Is it possible to get this library to be upgraded for .net 6 compatibility as well?

levlam commented 1 year ago

C# example uses volatile for variables, which can be accessed from multiple threads and are required to be volatile because of this.

You can use TDLib through С++/CLI, C++/CX or as a regular shared library, so you definitely can use it from .NET 6 in some way.

wrharper-AASP commented 1 year ago

Is there no standard cloud API without using a library? Just a standard auth header with JSON POST/GET? An entire library is actually a little overkill for my needs.

levlam commented 1 year ago

There is no.

wrharper-AASP commented 1 year ago

'Could not load file or assembly 'Telegram.Td, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.' for some reason it can't recognize the dll even though it loads into the project.

wrharper-AASP commented 1 year ago

This may have to do with openssl being out of date in the build? I have changed the project settings to use 3 instead of 1_1 but it still errors out. 1.1 is very old, is it required? This applies to libcrypto as well.

wrharper-AASP commented 1 year ago

I think the issue has to do with the vcpkg.exe command being shown in the example. a lot of this appears to be out of date: image

wrharper-AASP commented 1 year ago

i will make a separate post for this since it is technically a different subject.