SharpTox:包装盒库,用于Tox核心,AV和DNS功能

  • O5_143133
    了解作者
  • 62KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-12 06:12
    上传日期
夏普毒 该项目旨在提供一个简单的库,其中包装了中的所有功能。 Tox是Skype的免费替代品。 随时贡献! 您需要的东西 libtox(core,av and dns)库,您应该自己从编译。 有关如何执行此操作的指南,请参见 。 如果您不想自己编译它,可以在这里找到适用于Windows的自动构建: 或 根据您编译核心库的方式,这些库的名称可能与SharpTox中的默认库不同。 如果需要,请确保在ToxFunctions.cs,ToxAvFunctions.cs,ToxDnsFunctions.cs和ToxEncryptionFunctions.cs中相应地更改const字符串dll的值。 编译与测试 假设您已经安装了上述库,那么现在该编译(和测试)SharpTox了。 视窗 克隆此存储库。 在Visual Studio中打开SharpTox.sln。 让Visual Studio
SharpTox-master.zip
  • SharpTox-master
  • .travis.yml
    354B
  • LICENSE
    1.1KB
  • .gitignore
    34B
  • SharpTox.sln
    3.6KB
  • README.md
    4.4KB
  • SharpTox
  • SharpTox.nuspec
    810B
  • Core
  • ToxDelegates.cs
    4.7KB
  • ToxVersion.cs
    2.4KB
  • Tox.cs
    86.8KB
  • ToxEnums.cs
    18.9KB
  • ToxDataInfo.cs
    4.8KB
  • ToxKey.cs
    2.5KB
  • ToxId.cs
    6.6KB
  • ToxData.cs
    3.9KB
  • ToxFunctions.cs
    22KB
  • ToxOptions.cs
    6.4KB
  • ToxHandle.cs
    1.6KB
  • ToxNode.cs
    1.9KB
  • ToxConstants.cs
    1.9KB
  • ToxFileInfo.cs
    771B
  • ToxEventArgs.cs
    8.9KB
  • ToxTools.cs
    2KB
  • SharpTox.csproj
    8.6KB
  • SharpTox Portable.csproj
    5.9KB
  • Dns
  • ToxDnsFunctions.cs
    1.1KB
  • ToxDns.cs
    3.6KB
  • ToxDnsHandle.cs
    584B
  • Encryption
  • ToxEncryption.cs
    5.2KB
  • ToxEncryptionFunctions.cs
    2.5KB
  • ToxEncryptionErrors.cs
    433B
  • ToxPassKey.cs
    552B
  • ToxEncryptionKey.cs
    720B
  • Av
  • ToxAvHandle.cs
    571B
  • ToxAvDelegates.cs
    1.6KB
  • ToxAvVideoFrame.cs
    1.7KB
  • ToxAvAudioFrame.cs
    852B
  • ToxAvVersion.cs
    2.3KB
  • ToxAvFunctions.cs
    5.9KB
  • ToxAv.cs
    17.7KB
  • ToxAvEnums.cs
    1.5KB
  • ToxAvEventArgs.cs
    3.1KB
  • Properties
  • AssemblyInfo.cs
    1.5KB
  • SharpTox.Tests
  • CoreFriendTests.cs
    11.3KB
  • packages.config
    133B
  • CoreSelfTests.cs
    8.8KB
  • AvFriendTests.cs
    6.1KB
  • SharpTox.Tests.csproj
    5.6KB
  • MiscTests.cs
    2.5KB
  • Globals.cs
    874B
  • AvSelfTests.cs
    1.7KB
  • Properties
  • AssemblyInfo.cs
    1.4KB
  • .gitattributes
    15B
内容介绍
SharpTox [![Build Status](https://jenkins.impy.me/job/SharpTox%20x86/badge/icon)](https://jenkins.impy.me/job/SharpTox%20x86/) ======== This project aims to provide a simple library that wraps all of the functions found in the [Tox library](https://github.com/irungentoo/ProjectTox-Core "ProjectTox GitHub repo"). Tox is a free (as in freedom) Skype replacement. Feel free to contribute! ### Things you'll need * The libtox(core, av and dns) library, you should compile that yourself from the [ProjectTox GitHub repo](https://github.com/irungentoo/ProjectTox-Core "Tox Github repo"). Guidelines on how to do this can be found [here](https://github.com/irungentoo/toxcore/blob/master/INSTALL.md "Crosscompile guidelines"). If you don't feel like compiling this yourself, you can find automatic builds for windows here: [x86](https://build.tox.chat/view/libtoxcore/job/libtoxcore_build_windows_x86_shared_release/ "x86 dll") or [x64](https://build.tox.chat/view/libtoxcore/job/libtoxcore_build_windows_x86_64_shared_release/ "x64 dll") Depending on how you compiled the core libraries, the names of those may differ from the defaults in SharpTox. Be sure to change the value of the const string **dll** in ToxFunctions.cs, ToxAvFunctions.cs, ToxDnsFunctions.cs and ToxEncryptionFunctions.cs accordingly if needed. ### Compiling and Testing Assuming you have the libraries mentioned above installed, it's time to compile (and test) SharpTox. ##### Windows * Clone this repository. * Open SharpTox.sln in Visual Studio. * Let Visual Studio restore the NuGet packages and build the solution. * Optionally, run the tests by clicking 'Run All' in the Test Explorer. Or from the command line (Be sure to install [NUnit](http://www.nunit.org/index.php?p=download) and [NuGet](https://nuget.codeplex.com/) first): ``` git clone https://github.com/alexbakker/SharpTox nuget restore msbuild /p:Configuration:Debug nunit-console-x86 SharpTox.Tests/bin/Debug/SharpTox.Tests.dll ``` ##### Linux * Install 'mono-complete' (this should include nunit), grab the latest version of [NuGet](https://nuget.codeplex.com/) and execute the following commands: ``` git clone https://github.com/alexbakker/SharpTox mono NuGet.exe restore xbuild /p:Configuration="Debug POSIX" nunit-console4 SharpTox.Tests/bin/Debug/SharpTox.Tests.dll ``` If you're having issues obtaining the NuGet packages, try executing: ```mozroots --import --sync``` **Looking for precompiled binaries? [Check this](https://jenkins.impy.me/ "SharpTox Binaries").** ### Basic Usage ```csharp using System; using SharpTox.Core; class Program { static Tox tox; static void Main(string[] args) { ToxOptions options = new ToxOptions(true, true); tox = new Tox(options); tox.OnFriendRequestReceived += tox_OnFriendRequestReceived; tox.OnFriendMessageReceived += tox_OnFriendMessageReceived; foreach (ToxNode node in Nodes) tox.Bootstrap(node); tox.Name = "SharpTox"; tox.StatusMessage = "Testing SharpTox"; tox.Start(); string id = tox.Id.ToString(); Console.WriteLine("ID: {0}", id); Console.ReadKey(); tox.Dispose(); } //check https://wiki.tox.im/Nodes for an up-to-date list of nodes static ToxNode[] Nodes = new ToxNode[] { new ToxNode("192.254.75.98", 33445, new ToxKey(ToxKeyType.Public, "951C88B7E75C867418ACDB5D273821372BB5BD652740BCDF623A4FA293E75D2F")), new ToxNode("144.76.60.215", 33445, new ToxKey(ToxKeyType.Public, "04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F")) }; static void tox_OnFriendMessageReceived(object sender, ToxEventArgs.FriendMessageEventArgs e) { //get the name associated with the friendnumber string name = tox.GetFriendName(e.FriendNumber); //print the message to the console Console.WriteLine("<{0}> {1}", name, e.Message); } static void tox_OnFriendRequestReceived(object sender, ToxEventArgs.FriendRequestEventArgs e) { //automatically accept every friend request we receive tox.AddFriendNoRequest(e.PublicKey); } } ``` Contact ------- * Join the official IRC channel #tox-dev on freenode [![Official Tox Dev IRC Channel](https://kiwiirc.com/buttons/irc.freenode.net/tox-dev.png)](https://kiwiirc.com/client/irc.freenode.net/?theme=basic#tox-dev)
评论
    相关推荐